mirror of
https://github.com/arsenetar/send2trash.git
synced 2025-05-08 09:49:52 +00:00
Fix issue with paths starting with \\?\
- Strip these characters off if present just like old implementation
This commit is contained in:
parent
7abc048836
commit
629c2403e9
@ -25,6 +25,8 @@ try:
|
|||||||
]
|
]
|
||||||
# convert to full paths
|
# convert to full paths
|
||||||
path = [op.abspath(item) if not op.isabs(item) else item for item in path]
|
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
|
# create instance of file operation object
|
||||||
fileop = pythoncom.CoCreateInstance(
|
fileop = pythoncom.CoCreateInstance(
|
||||||
shell.CLSID_FileOperation,
|
shell.CLSID_FileOperation,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user