mirror of
https://github.com/arsenetar/dupeguru.git
synced 2026-01-22 14:41:39 +00:00
Use the send2trash lib in _do_delete_dupe().
This commit is contained in:
@@ -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])
|
||||
|
||||
@@ -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'/'
|
||||
@@ -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'/'
|
||||
@@ -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:\\'
|
||||
Reference in New Issue
Block a user