Make trash hungry
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
parent
67d473aab7
commit
0c6362f28d
7 changed files with 11 additions and 15 deletions
|
@ -148,14 +148,10 @@ bool Resource::enable(EnableAction action)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool Resource::destroy()
|
||||
bool Resource::destroy(bool attemptTrash)
|
||||
{
|
||||
m_type = ResourceType::UNKNOWN;
|
||||
|
||||
if (FS::trash(m_file_info.filePath()))
|
||||
return true;
|
||||
|
||||
return FS::deletePath(m_file_info.filePath());
|
||||
return (attemptTrash && FS::trash(m_file_info.filePath())) || FS::deletePath(m_file_info.filePath());
|
||||
}
|
||||
|
||||
bool Resource::isSymLinkUnder(const QString& instPath) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue