Improve handling of destructive actions
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
parent
e05ccc0e55
commit
127b094c41
17 changed files with 218 additions and 83 deletions
|
@ -143,5 +143,9 @@ bool Resource::enable(EnableAction action)
|
|||
bool Resource::destroy()
|
||||
{
|
||||
m_type = ResourceType::UNKNOWN;
|
||||
|
||||
if (FS::trash(m_file_info.filePath()))
|
||||
return true;
|
||||
|
||||
return FS::deletePath(m_file_info.filePath());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue