mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-23 04:54:18 +00:00
parent
d3e7e8a630
commit
d2a29c2f87
@ -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…
x
Reference in New Issue
Block a user