File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -163,7 +163,16 @@ void SettingsStorage::readNativeSettings()
163163
164164bool SettingsStorage::writeNativeSettings () const
165165{
166- std::unique_ptr<QSettings> nativeSettings = Profile::instance ()->applicationSettings (m_nativeSettingsName + u" _new" );
166+ const auto *profile = Profile::instance ();
167+
168+ // No-op when it has no write permission
169+ if (const auto confPath = Path (profile->applicationSettings (m_nativeSettingsName)->fileName ());
170+ !Utils::Fs::isWritable (confPath))
171+ {
172+ return true ; // no need to retry saving
173+ }
174+
175+ std::unique_ptr<QSettings> nativeSettings = profile->applicationSettings (m_nativeSettingsName + u" _new" );
167176
168177 // QSettings deletes the file before writing it out. This can result in problems
169178 // if the disk is full or a power outage occurs. Those events might occur
You can’t perform that action at this time.
0 commit comments