mark files as duplicate
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
2d51008304
commit
d2510b851b
5 changed files with 49 additions and 16 deletions
|
@ -161,10 +161,13 @@ bool Resource::enable(EnableAction action)
|
|||
path.chop(9);
|
||||
} else {
|
||||
path += ".disabled";
|
||||
auto newFilePath = 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 (!QFile::remove(path))
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
if (!file.rename(path))
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue