From 2655dcf64968936ee163b2b4aa31ed7ba2f4493e Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 23 May 2013 13:42:31 +0900 Subject: [PATCH] move unused media to trash too --- aqt/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aqt/main.py b/aqt/main.py index 109fd7e25..1995c4b12 100644 --- a/aqt/main.py +++ b/aqt/main.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html -import os, sys, re, traceback, signal +import os, sys, re, traceback, signal, send2trash import zipfile from aqt.qt import * @@ -923,7 +923,7 @@ will be lost. Continue?""")) mdir = self.col.media.dir() for f in unused: path = os.path.join(mdir, f) - os.unlink(path) + send2trash.send2trash(path) tooltip(_("Deleted.")) diag.close()