e5b4b5d295
* Tasks are now described by class name and object name (or memory address). * Tasks starts are logged. * Aborted tasks are now treated just as the other cases.
22 lines
407 B
C++
22 lines
407 B
C++
#include "FoldersTask.h"
|
|
#include "minecraft/onesix/OneSixInstance.h"
|
|
#include <QDir>
|
|
|
|
FoldersTask::FoldersTask(OneSixInstance * inst)
|
|
:Task()
|
|
{
|
|
m_inst = inst;
|
|
}
|
|
|
|
void FoldersTask::executeTask()
|
|
{
|
|
// Make directories
|
|
QDir mcDir(m_inst->minecraftRoot());
|
|
if (!mcDir.exists() && !mcDir.mkpath("."))
|
|
{
|
|
emitFailed(tr("Failed to create folder for minecraft binaries."));
|
|
return;
|
|
}
|
|
emitSucceeded();
|
|
}
|