SCRATCH nuke the overcomplicated logger, use a simple one.
This commit is contained in:
@ -106,10 +106,10 @@ void FTBProfileStrategy::loadUserPatches()
|
||||
QFileInfo finfo(filename);
|
||||
if(!finfo.exists())
|
||||
{
|
||||
QLOG_INFO() << "Patch file " << filename << " was deleted by external means...";
|
||||
qDebug() << "Patch file " << filename << " was deleted by external means...";
|
||||
continue;
|
||||
}
|
||||
QLOG_INFO() << "Reading" << filename << "by user order";
|
||||
qDebug() << "Reading" << filename << "by user order";
|
||||
auto file = ProfileUtils::parseJsonFile(finfo, false);
|
||||
// sanity check. prevent tampering with files.
|
||||
if (file->fileId != id)
|
||||
@ -124,7 +124,7 @@ void FTBProfileStrategy::loadUserPatches()
|
||||
for (auto info : patches.entryInfoList(QStringList() << "*.json", QDir::Files))
|
||||
{
|
||||
// parse the file
|
||||
QLOG_INFO() << "Reading" << info.fileName();
|
||||
qDebug() << "Reading" << info.fileName();
|
||||
auto file = ProfileUtils::parseJsonFile(info, true);
|
||||
// ignore builtins
|
||||
if (file->fileId == "net.minecraft")
|
||||
|
@ -21,11 +21,11 @@ void OneSixFTBInstance::copy(const QDir &newDir)
|
||||
QStringList libraryNames;
|
||||
// create patch file
|
||||
{
|
||||
QLOG_DEBUG() << "Creating patch file for FTB instance...";
|
||||
qDebug()<< "Creating patch file for FTB instance...";
|
||||
QFile f(minecraftRoot() + "/pack.json");
|
||||
if (!f.open(QFile::ReadOnly))
|
||||
{
|
||||
QLOG_ERROR() << "Couldn't open" << f.fileName() << ":" << f.errorString();
|
||||
qCritical() << "Couldn't open" << f.fileName() << ":" << f.errorString();
|
||||
return;
|
||||
}
|
||||
QJsonObject root = QJsonDocument::fromJson(f.readAll()).object();
|
||||
@ -68,14 +68,14 @@ void OneSixFTBInstance::copy(const QDir &newDir)
|
||||
QFile out(newDir.absoluteFilePath("patches/ftb.json"));
|
||||
if (!out.open(QFile::WriteOnly | QFile::Truncate))
|
||||
{
|
||||
QLOG_ERROR() << "Couldn't open" << out.fileName() << ":" << out.errorString();
|
||||
qCritical() << "Couldn't open" << out.fileName() << ":" << out.errorString();
|
||||
return;
|
||||
}
|
||||
out.write(QJsonDocument(root).toJson());
|
||||
}
|
||||
// copy libraries
|
||||
{
|
||||
QLOG_DEBUG() << "Copying FTB libraries";
|
||||
qDebug() << "Copying FTB libraries";
|
||||
for (auto library : libraryNames)
|
||||
{
|
||||
OneSixLibrary *lib = new OneSixLibrary(library);
|
||||
@ -86,11 +86,11 @@ void OneSixFTBInstance::copy(const QDir &newDir)
|
||||
}
|
||||
if (!ensureFilePathExists(out))
|
||||
{
|
||||
QLOG_ERROR() << "Couldn't create folder structure for" << out;
|
||||
qCritical() << "Couldn't create folder structure for" << out;
|
||||
}
|
||||
if (!QFile::copy(librariesPath().absoluteFilePath(lib->storagePath()), out))
|
||||
{
|
||||
QLOG_ERROR() << "Couldn't copy" << lib->rawName();
|
||||
qCritical() << "Couldn't copy" << lib->rawName();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user