|
|
@ -118,8 +118,11 @@ int main(int argc, char **argv) |
|
|
|
#ifdef Q_WS_X11 |
|
|
|
#ifdef Q_WS_X11 |
|
|
|
{ |
|
|
|
{ |
|
|
|
QString OldHomeDir = QDir::homePath()+"/.keepassx"; |
|
|
|
QString OldHomeDir = QDir::homePath()+"/.keepassx"; |
|
|
|
if (args.configLocation().isEmpty() && QFile::exists(OldHomeDir+"/config") && !QFile::exists(HomeDir+"/config")) |
|
|
|
if (args.configLocation().isEmpty() && QFile::exists(OldHomeDir+"/config") && !QFile::exists(HomeDir+"/config")) { |
|
|
|
QFile::rename(OldHomeDir+"/config", HomeDir+"/config.ini"); |
|
|
|
QFile::rename(OldHomeDir+"/config", HomeDir+"/config.ini"); |
|
|
|
|
|
|
|
if (QDir(OldHomeDir).entryList(QDir::AllEntries|QDir::NoDotAndDotDot|QDir::Hidden|QDir::System).count()==0) |
|
|
|
|
|
|
|
QDir().rmdir(OldHomeDir); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
#else |
|
|
|
#else |
|
|
|
if (args.configLocation().isEmpty() && QFile::exists(HomeDir+"/config") && !QFile::exists(HomeDir+"/config.ini")) |
|
|
|
if (args.configLocation().isEmpty() && QFile::exists(HomeDir+"/config") && !QFile::exists(HomeDir+"/config.ini")) |
|
|
|