fix tests

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97 2024-06-14 23:27:27 +03:00
parent 1a84dc9bca
commit 8cdaf5d05f
No known key found for this signature in database
GPG Key ID: 55EF5DA53DB36318

View File

@ -161,7 +161,9 @@ bool Resource::enable(EnableAction action)
path.chop(9); path.chop(9);
} else { } else {
path += ".disabled"; path += ".disabled";
path = FS::getUniqueResourceName(path); if (QFile::exists(path)) {
path = FS::getUniqueResourceName(path);
}
} }
if (!file.rename(path)) if (!file.rename(path))
return false; return false;