(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.
This commit is contained in:
Jordan Lee 2011-01-23 18:40:29 +00:00
parent bc50a6d868
commit 2e3ccd8532
1 changed files with 5 additions and 6 deletions

View File

@ -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();