1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2026-01-22 06:37:17 +00:00

Use the send2trash lib in _do_delete_dupe().

This commit is contained in:
Virgil Dupras
2010-04-07 09:11:36 +02:00
parent 3b510389fc
commit 5be76d7c0f
6 changed files with 13 additions and 45 deletions

View File

@@ -121,10 +121,6 @@ class DupeGuru(DupeGuruBase, QObject):
url = QUrl.fromLocalFile(unicode(path))
QDesktopServices.openUrl(url)
@staticmethod
def _recycle_dupe(dupe):
platform.recycle_file(dupe.path)
@staticmethod
def _reveal_path(path):
DupeGuru._open_path(path[:-1])

View File

@@ -7,7 +7,4 @@
# which should be included with this package. The terms are also available at
# http://www.hardcoded.net/licenses/hs_license
INITIAL_FOLDER_IN_DIALOGS = '/'
def recycle_file(path):
pass
INITIAL_FOLDER_IN_DIALOGS = u'/'

View File

@@ -9,7 +9,4 @@
# dummy unit to allow the app to run under OSX during development
INITIAL_FOLDER_IN_DIALOGS = '/'
def recycle_file(path):
pass
INITIAL_FOLDER_IN_DIALOGS = u'/'

View File

@@ -7,16 +7,4 @@
# which should be included with this package. The terms are also available at
# http://www.hardcoded.net/licenses/hs_license
from __future__ import unicode_literals
import logging
import winshell
INITIAL_FOLDER_IN_DIALOGS = 'C:\\'
def recycle_file(path):
try:
winshell.delete_file(unicode(path), no_confirm=True, silent=True)
except winshell.x_winshell as e:
logging.warning("winshell error: %s", e)
INITIAL_FOLDER_IN_DIALOGS = u'C:\\'