mirror of
https://github.com/arsenetar/send2trash.git
synced 2025-05-08 01:39:51 +00:00
Merge bc531441393dab7f98c9064a3187d583df675dd5 into 0974912e7864399e4e554ae309838b24f96dc406
This commit is contained in:
commit
75228ad623
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user