From 2e3ccd8532c79d8ebb843da51f85ad93ccf87318 Mon Sep 17 00:00:00 2001 From: Jordan Lee Date: Sun, 23 Jan 2011 18:40:29 +0000 Subject: [PATCH] (trunk qt) #3938 "the defualt config directory isn't created by the Qt client" -- minor revision to r11755 to handle the case of custom config directories passed in via the command line. transmission-daemon and transmission-gtk will create these custom config directories if they don't exist. transmission-qt should, too. --- qt/app.cc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/qt/app.cc b/qt/app.cc index 3d95a6104..b2cb67f5a 100644 --- a/qt/app.cc +++ b/qt/app.cc @@ -136,14 +136,13 @@ MyApp :: MyApp( int& argc, char ** argv ): } // set the fallback config dir - if( configDir == 0 ) { + if( configDir == 0 ) configDir = tr_getDefaultConfigDir( MY_CONFIG_NAME ); - // ensure the config directory exists - QDir dir( configDir ); - if( !dir.exists() ) - dir.mkpath( configDir ); - } + // ensure our config directory exists + QDir dir( configDir ); + if( !dir.exists() ) + dir.mkpath( configDir ); // is this the first time we've run transmission? const bool firstTime = !QFile(QDir(configDir).absoluteFilePath("settings.json")).exists();