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

Handling Long Paths on Windows (was FileNotFoundError: [WinError 206]) #1020

Closed
damienleroux opened this issue Oct 30, 2015 · 4 comments
Closed

Comments

@damienleroux
Copy link

I'm trying to install a package but got this error:

reloading /D/WebFront/GitHubs/SublimeText-Dev-Env/Builds/Sublime Text Build 3083 x64/Data/Packages/User/Preferences.sublime-settings
Exception in thread Thread-6:
Traceback (most recent call last):
  File "./threading.py", line 901, in _bootstrap_inner
  File "package_control.package_installer in D:\WebFront\GitHubs\SublimeText-Dev-Env\Builds\Sublime Text Build 3083 x64\Data\Installed Packages\Package Control.sublime-package", line 204, in run
  File "package_control.package_manager in D:\WebFront\GitHubs\SublimeText-Dev-Env\Builds\Sublime Text Build 3083 x64\Data\Installed Packages\Package Control.sublime-package", line 1206, in install_package
  File "./os.py", line 269, in makedirs
FileNotFoundError: [WinError 206] Nom de fichier ou extension trop long: 'D:\\WebFront\\GitHubs\\SublimeText-Dev-Env\\Builds\\Sublime Text Build 3083 x64\\Data\\Packages\\jsfmt\\node_modules\\jsfmt\\node_modules\\esformatter\\node_modules\\npm-run\\node_modules\\npm-path\\node_modules\\which\\node_modules\\is-absolute\\node_modules\\is-relative\\'

It seems to be an issue with too long path name. had anyone the same problem?

The package I tried to install is loaded as an ignored package and creates errors when trying to use it.

PS:
I use sublime Text 3 64 bits official paid version

Thank you for helping

@wbond
Copy link
Owner

wbond commented Oct 30, 2015

Sounds like an incompatibility between the package and your OS. I don't think there is much PC can do about it.

@wbond
Copy link
Owner

wbond commented Oct 30, 2015

Probably the simplest solution is move your ST install to a folder with a shorter path so you are less likely to hit the 256 char path limit in Windows.

@damienleroux
Copy link
Author

I don't think an external software is the solution. how this could help package control to handle too long path?

@wbond
Copy link
Owner

wbond commented Aug 1, 2016

It seems that all path operations on Windows dealing with longs paths would need to prefix the path with \\?\. http://stackoverflow.com/questions/1880321/why-does-the-260-character-path-length-limit-exist-in-windows

@wbond wbond changed the title FileNotFoundError: [WinError 206] Handling Long Paths on Windows (was FileNotFoundError: [WinError 206]) Aug 1, 2016
@deathaxe deathaxe added this to the Package Control 4.0 milestone Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
@wbond @damienleroux @deathaxe and others