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