Repository navigation
Conversation
|
Some overlap here with #89 as well. |
SHFileOperationW deletes a tree that holds a path of MAX_PATH characters or more permanently instead of recycling it, and still returns success; shortening the top-level path to 8.3 names does not help because the names inside stay long. The legacy backend now walks each path first and raises TrashPermissionError, the error arsenetar#115 uses for the IFileOperation backend, leaving the files in place. The legacy long-path tests expect that now, and a new test covers a short folder holding a long path.
|
@arsenetar Thanks for looking! I hadn't seen #89 when I opened this but then looked at it shortly after. It does seem to contain the same root cause (pywin32 ignores the callback's return value, so the sink has to raise), so credit to @Dobatymo . The difference is how the error surfaces. #89 raises a plain exception, so pywin32 prints an "Unexpected exception in gateway method" traceback on every refusal and callers get a generic #89 does report other per-item errors better. I'm happy to port that with @Dobatymo as co-author, either here or in a follow-up, whichever you prefer. |
|
Ok that sounds reasonable, I think incorporating the other changes as mentioned would be nice. |
Co-authored-by: Dobatymo <7647594+Dobatymo@users.noreply.github.com>
Fixes #94