CommandDelete: Rework deletion logic

Allow deleting files from index which still exist
on the fileystem without passing their path to "qss delete".

Thus: "qss delete --deleted" deletes all files which
don't exist anymore.

Also, fix some bugs in offset calculation.
This commit is contained in:
2020-08-30 18:12:42 +02:00
والد 30c077ad6d
کامیت a1fbf35cde
2فایلهای تغییر یافته به همراه30 افزوده شده و 11 حذف شده

مشاهده پرونده

@@ -10,7 +10,7 @@ class CommandDelete : public Command
int handle(QStringList arguments) override;
private:
int removeNonExistent(bool verbose, bool dryRun, QString pattern);
int remove(QString pattern, bool onlyDeleted, bool verbose, bool dryRun);
int removePaths(const QStringList &paths, bool verbose, bool dryRun);
};