do not double rename
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
d2510b851b
commit
b872f88617
@ -161,10 +161,7 @@ bool Resource::enable(EnableAction action)
|
|||||||
path.chop(9);
|
path.chop(9);
|
||||||
} else {
|
} else {
|
||||||
path += ".disabled";
|
path += ".disabled";
|
||||||
auto newFilePath = FS::getUniqueResourceName(path);
|
path = FS::getUniqueResourceName(path);
|
||||||
if (newFilePath != path) {
|
|
||||||
FS::move(path, newFilePath);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (QFileInfo::exists(path)) { // the path exists so just remove the file at path
|
if (QFileInfo::exists(path)) { // the path exists so just remove the file at path
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user