The legacy implementation was not handling UNC names properly:
Traceback (most recent call last):
File "check.py", line 6, in <module>
send2trash(str(file))
File "\...\plat_win_legacy.py", line 79, in send2trash
paths = [get_short_path_name(path) for path in paths]
File "\...\plat_win_legacy.py", line 79, in <listcomp>
paths = [get_short_path_name(path) for path in paths]
File "\...\plat_win_legacy.py", line 62, in get_short_path_name
raise WindowsError(err_no, FormatError(err_no), long_name[4:])
OSError: [Errno 123] La syntaxe du nom de fichier, de répertoire ou de volume est incorrecte.: '\\\\SERVER\\folder\\file.txt'
Really just checking that the setup is able to create test files so it
is known they were there then removed.
Windows tests really need verification of
recycle, which is not present.
- Add handling to create correctly sized buffer even with multibyte
characters as len() in python does not line up with what
create_unicode_buffer() needs for length.
- Add test for single and multiple files
The trash info file needs to exist before the file is moved into the trash folder.
This is to conform to the events based detection of trashed files in gnome and other file managers.
- Fix some flake8 formatting errors
- Auto-format files edited
- Also ignore some flake8 errors when they are intented
- Update .gitignore to ingore local env
* Initial IFileOperation for Windows
- Try using IFileOperation instead of SHFileOperation
- Use pywin32 to accomplish this
- Implement fallback when pywin32 not available
- Handles paths like `C:\` just fine bu the `\\?\` paths in the test
cause issue
- Add batching for IFileOperation version (performance)
- Minor formatting applied by editor
* Fix issue with paths starting with \\?\
- Strip these characters off if present just like old implementation
* Add windows version check, legacy list support
- Add check for windows version for IFileOperation
- Add list support to legacy version
- Remove some debugging code
- Fix bug in path converson
Not sure if there is a better way to layout this file
* Split plat_win into legacy and modern
* Update other platforms for list support
Formatter also ran on these so some other minor changes.
* Add unit tests for multi-file calls