mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-26 19:26:59 +03:00
parent
d3e7e8a630
commit
d2a29c2f87
1 changed files with 6 additions and 3 deletions
|
@ -188,10 +188,13 @@ bool SettingsStorage::writeNativeSettings() const
|
|||
break;
|
||||
}
|
||||
|
||||
if (nativeSettings->status() != QSettings::NoError)
|
||||
return false;
|
||||
|
||||
const Path newPath {nativeSettings->fileName()};
|
||||
if (nativeSettings->status() != QSettings::NoError)
|
||||
{
|
||||
Utils::Fs::removeFile(newPath);
|
||||
return false;
|
||||
}
|
||||
|
||||
QString finalPathStr = newPath.data();
|
||||
const int index = finalPathStr.lastIndexOf(u"_new", -1, Qt::CaseInsensitive);
|
||||
finalPathStr.remove(index, 4);
|
||||
|
|
Loading…
Reference in a new issue