1
0
mirror of https://github.com/arsenetar/send2trash.git synced 2026-03-15 12:01:39 +00:00
This commit is contained in:
baffo
2017-06-01 07:26:58 +00:00
committed by GitHub

View File

@@ -133,7 +133,7 @@ def get_dev(path):
def send2trash(path):
if not isinstance(path, str):
path = str(path, sys.getfilesystemencoding())
path = str(path).encode(sys.getfilesystemencoding())
if not op.exists(path):
raise OSError("File not found: %s" % path)
# ...should check whether the user has the necessary permissions to delete