1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 09:13:06 +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 // set the fallback config dir
if( configDir == 0 ) { if( configDir == 0 )
configDir = tr_getDefaultConfigDir( MY_CONFIG_NAME ); configDir = tr_getDefaultConfigDir( MY_CONFIG_NAME );
// ensure the config directory exists // ensure our config directory exists
QDir dir( configDir ); QDir dir( configDir );
if( !dir.exists() ) if( !dir.exists() )
dir.mkpath( configDir ); dir.mkpath( configDir );
}
// is this the first time we've run transmission? // is this the first time we've run transmission?
const bool firstTime = !QFile(QDir(configDir).absoluteFilePath("settings.json")).exists(); const bool firstTime = !QFile(QDir(configDir).absoluteFilePath("settings.json")).exists();