Modify removeRecursively to be able to delete a file.
Added getParentId func. Add the datatype for newly inserted items. Pass a double pointer instead of a pointer reference so the metadata_t can be optional. Make sure to delete the files after deleting an entry in the backup manager.
This commit is contained in:
@@ -181,15 +181,6 @@ void CMAObject::initObject(const QFileInfo &file, int file_type)
|
||||
updateObjectSize(file.size());
|
||||
}
|
||||
|
||||
bool CMAObject::removeReferencedObject()
|
||||
{
|
||||
if(metadata.dataType & Folder) {
|
||||
return removeRecursively(path);
|
||||
} else {
|
||||
return QFile::remove(path);
|
||||
}
|
||||
}
|
||||
|
||||
void CMAObject::updateObjectSize(qint64 size)
|
||||
{
|
||||
if(parent) {
|
||||
|
||||
Reference in New Issue
Block a user