mirror of
https://github.com/transmission/transmission
synced 2025-02-28 16:55:28 +00:00
(trunk qt) #3938 "The default config directory isn't created by the Qt client" -- fixed.
Summary says it all. Patch by luksan with minor formatting changes (and, no doubt, a new bug) by me.
This commit is contained in:
parent
0aee598300
commit
d38634a3f7
1 changed files with 7 additions and 1 deletions
|
@ -136,9 +136,15 @@ 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 );
|
||||
}
|
||||
|
||||
// is this the first time we've run transmission?
|
||||
const bool firstTime = !QFile(QDir(configDir).absoluteFilePath("settings.json")).exists();
|
||||
|
||||
|
|
Loading…
Reference in a new issue