From 077d9f2745f212889d83533ecbb70bccc0687305 Mon Sep 17 00:00:00 2001 From: Peng Liu Date: Thu, 31 Jul 2014 17:30:15 -0400 Subject: [PATCH] Checks if CUSTOM folder was successfully created. If not, prints qDebug message and proceeds as normal except uses default card images instead of custom ones. --- cockatrice/src/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cockatrice/src/main.cpp b/cockatrice/src/main.cpp index df38bbf6..d53462d0 100644 --- a/cockatrice/src/main.cpp +++ b/cockatrice/src/main.cpp @@ -158,7 +158,9 @@ int main(int argc, char *argv[]) QDir().mkpath(dataDir + "/pics"); settingsCache->setPicsPath(dataDir + "/pics"); } - + if (!QDir().mkpath(settingsCache->getPicsPath() + "/CUSTOM")) + qDebug("Could not create " settingsCache->getPicsPath() + "/CUSTOM. Will fall back on default card images."); + #ifdef Q_OS_MAC if(settingsCache->getHandBgPath().isEmpty() && settingsCache->getStackBgPath().isEmpty() &&