summaryrefslogtreecommitdiffstats
path: root/api/logic/minecraft/onesix/update/FoldersTask.cpp
blob: 239a267583f212ef60d6857de542a00c595daa46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "FoldersTask.h"
#include "minecraft/onesix/OneSixInstance.h"
#include <QDir>

FoldersTask::FoldersTask(OneSixInstance * inst)
{
	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();
}