-
Notifications
You must be signed in to change notification settings - Fork 904
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
Support Long Paths #934
Comments
Hello @dmitrijs-rjazanovs - we need to see full output log please (minus any sensitive data). It will help us see what is running and what the script looks like so we can provide support. |
@ferventcoder Hi Rob. Updated output log. It is all i can get. Thanks. |
Okay, the problem appears to be that there are some files inside the package that have a path much longer than the .NET framework (and by extension Chocolatey) can deal with. So we'll need to find a way around that. |
Slightly OT- I did notice this issue for install:
Should be passed as: |
This is fixed for 0.10.1 |
Installing a package or working with packaging could mean paths that are over 260 characters (MAX_PATH). Sometimes backing up a path will take it over 260 characters resulting in errors when attempting to upgrade/uninstall packages that have pretty long paths. This is done by using the AlphaFS library. Unfortunately it doesn't use the .NET Framework methods and check lengths before it uses its implementation with native calls so it doesn't appear to be Mono safe. This meant the implementation of IFileSystem that is being used will need to perform those checks and fall back on errors. This also means the addition of dynamics to support switching between two interpretations of FileInfo and DirectoryInfo.
Leaving this here for people to find:
|
This has been closed and labelled as fixed. However I still get errors with applications with paths longer than 260 characters. |
@nmulvihill Chocolatey supports longer paths, but that doesn't mean that Windows or other things do. If you have a log, can you show the relevant parts of the error message (along with other messages surrounding it)? There may be an issue where it sees an error, but handles it without issue by flipping over to long paths. |
Chocolatey v0.10.7 Chocolatey installed 0/1 packages. 1 packages failed. Failures
|
@nmulvihill That is likely in the NuGet.Core codebase. We'll need to get in there and fix it to support this as well. Would it be too much trouble to have you open a new issue with that log? |
Not at all! |
I was curious where this stands because we are internally about to get into a situation where this might matter. We have some custom packages with grotesque filenames to contain very specific information about the nature of the files inside. The current sample of filenames won't currently exceed 260 characters, but the combination of the filename with their path probably would. |
Original Title: Uninstall backup files path too long - The fully qualified file name must be less than 260 characters
What You Are Seeing?
choco uninstall -y SitefinityCMS
Chocolatey uninstalled 1/1 packages. 0 packages failed.
"C:\ProgramData\chocolatey\choco.exe" install -y SitefinityCMS -source C:\Nuget -force -pre -params "/Environment:Cleanup /InstallRoot:D:\Solution"
What is Expected?
How Did You Get This To Happen? (Steps to Reproduce)
Yesterday worked fine with 0.9.8 version. Nothing was changed in scripts, just updated choco version and it failed.
Output Log
Config
The text was updated successfully, but these errors were encountered: