From 629c2403e9d8c5c23482e07e02cba96ee8a768ba Mon Sep 17 00:00:00 2001 From: Andrew Senetar Date: Thu, 21 May 2020 22:28:26 -0500 Subject: [PATCH] Fix issue with paths starting with \\?\ - Strip these characters off if present just like old implementation --- send2trash/plat_win.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/send2trash/plat_win.py b/send2trash/plat_win.py index 6d5f64e..eff0525 100644 --- a/send2trash/plat_win.py +++ b/send2trash/plat_win.py @@ -25,6 +25,8 @@ try: ] # convert to full paths path = [op.abspath(item) if not op.isabs(item) else item for item in path] + # remove the leading \\?\ if present + path = [item[4:] for item in path if item.startswith("\\\\?\\")] # create instance of file operation object fileop = pythoncom.CoCreateInstance( shell.CLSID_FileOperation,