1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 01:03:01 +00:00

(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

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