Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows legacy: fix handling of UNC names #57

Merged
merged 1 commit into from Jun 22, 2021
Merged

Windows legacy: fix handling of UNC names #57

merged 1 commit into from Jun 22, 2021

Conversation

BoboTiG
Copy link
Contributor

@BoboTiG BoboTiG commented May 26, 2021

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'

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'
@arsenetar arsenetar merged commit 077598d into arsenetar:master Jun 22, 2021
@BoboTiG BoboTiG deleted the fix-windows-unc-names-legacy branch June 22, 2021 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants