diff options
| author | Tannin <devnull@localhost> | 2015-08-27 20:59:37 +0200 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2015-08-27 20:59:37 +0200 |
| commit | 83edfe0c961525fca3297b6862d5040b3da73d81 (patch) | |
| tree | e42bc169532a97e955b41603a5d10fff0a8a9eca /src | |
| parent | 86d833bcc8507bc016c18e525467c9afa7d1de86 (diff) | |
| parent | 32339addbf42041edece07e0fe180a42aaf56d48 (diff) | |
Merge
Diffstat (limited to 'src')
| -rw-r--r-- | src/organizercore.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/organizercore.cpp b/src/organizercore.cpp index cea1a868..fe19bb90 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -244,11 +244,13 @@ QSettings::Status OrganizerCore::storeSettings(const QString &fileName) void OrganizerCore::storeSettings()
{
QString iniFile = qApp->property("dataPath").toString() + "/" + QString::fromStdWString(AppConfig::iniFileName());
- if (!shellCopy(iniFile, iniFile + ".new", true, qApp->activeWindow())) {
- QMessageBox::critical(qApp->activeWindow(), tr("Failed to write settings"),
- tr("An error occured trying to update MO settings to %1: %2").arg(
- iniFile, windowsErrorString(::GetLastError())));
- return;
+ if (QFileInfo(iniFile).exists()) {
+ if (!shellCopy(iniFile, iniFile + ".new", true, qApp->activeWindow())) {
+ QMessageBox::critical(qApp->activeWindow(), tr("Failed to write settings"),
+ tr("An error occured trying to update MO settings to %1: %2").arg(
+ iniFile, windowsErrorString(::GetLastError())));
+ return;
+ }
}
QSettings::Status result = storeSettings(iniFile + ".new");
|
