package_control icon indicating copy to clipboard operation
package_control copied to clipboard

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

Open damienleroux opened this issue 10 years ago • 4 comments

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

damienleroux avatar Oct 30 '15 09:10 damienleroux

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

wbond avatar Oct 30 '15 14:10 wbond

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.

wbond avatar Oct 30 '15 14:10 wbond

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

damienleroux avatar Nov 23 '15 07:11 damienleroux

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 avatar Aug 01 '16 10:08 wbond