mirror of
https://github.com/ankitects/anki.git
synced 2025-09-23 00:12:25 -04:00
move unused media to trash too
This commit is contained in:
parent
97a342ae23
commit
2655dcf649
1 changed files with 2 additions and 2 deletions
|
@ -2,7 +2,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
# 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
|
import zipfile
|
||||||
|
|
||||||
from aqt.qt import *
|
from aqt.qt import *
|
||||||
|
@ -923,7 +923,7 @@ will be lost. Continue?"""))
|
||||||
mdir = self.col.media.dir()
|
mdir = self.col.media.dir()
|
||||||
for f in unused:
|
for f in unused:
|
||||||
path = os.path.join(mdir, f)
|
path = os.path.join(mdir, f)
|
||||||
os.unlink(path)
|
send2trash.send2trash(path)
|
||||||
tooltip(_("Deleted."))
|
tooltip(_("Deleted."))
|
||||||
diag.close()
|
diag.close()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue