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:
codestation
2014-01-28 18:05:43 -04:30
parent b7ad2b13f4
commit a021c5db8f
9 changed files with 62 additions and 54 deletions

View File

@@ -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) {