}
}
+ // TODO check permissions
+
if (!QFile::rename(oldFile.canonicalFilePath(), newFileString))
{
fl.failedRename = true;
db->setFileLocation(fl);
db->log(tr("Rename: File <%1> was renamed to <%2>").arg(oldFile.canonicalFilePath()).arg(newFileString));
+
+ // TODO cleanup empty dirs
}
emit renameBatchFinished();
CREATE RULE new_episode_rule AS ON INSERT TO episode DO NOTIFY rename_data_changed;
CREATE RULE new_file_rule AS ON INSERT TO file DO NOTIFY rename_data_changed;
+-- WHEN (OLD.* IS DISTINCT FROM NEW.*) <- means if anything changed
CREATE RULE update_anime_rule AS
ON UPDATE TO anime
WHERE old.aid = new.aid