diff --git a/src/openstudio_app/OpenStudioApp.cpp b/src/openstudio_app/OpenStudioApp.cpp index 690410f89..83ef31a57 100644 --- a/src/openstudio_app/OpenStudioApp.cpp +++ b/src/openstudio_app/OpenStudioApp.cpp @@ -132,6 +132,7 @@ #include #include #include +#include #include #include @@ -1173,6 +1174,10 @@ void OpenStudioApp::writeSettings() { QString organizationName = QCoreApplication::organizationName(); QString applicationName = QCoreApplication::applicationName(); QSettings settings(organizationName, applicationName); + if (!settings.isWritable()) { + QMessageBox::warning(nullptr, tr("Settings file not writable"), + tr("Your settings file '") + settings.fileName() + tr("' is not writable. Adjust the file permissions")); + } settings.setValue("lastPath", lastPath()); } @@ -1302,6 +1307,11 @@ void OpenStudioApp::writeLibraryPaths(std::vector paths) { QSettings settings(QCoreApplication::organizationName(), QCoreApplication::applicationName()); + if (!settings.isWritable()) { + QMessageBox::warning(nullptr, tr("Settings file not writable"), + tr("Your settings file '") + settings.fileName() + tr("' is not writable. Adjust the file permissions")); + } + if (paths == defaultPaths) { settings.remove("library"); } else {