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

Write-FileUpdateLog fails when the path is more than 260 characters #156

Closed
lygstate opened this issue Mar 9, 2015 · 13 comments
Closed

Comments

@lygstate
Copy link

lygstate commented Mar 9, 2015

Update: Chocolatey 0.9.10.0+ does not use Write-FileUpdateLog and this function has been deprecated.

When I install mongodb with:

choco install -y mongodb

The following error appeared

Get-ChildItem : The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the director
y name must be less than 248 characters.
At C:\ProgramData\chocolatey\chocolateyinstall\helpers\functions\Write-FileUpdateLog.ps1:12 char:23

$originalContents = Get-ChildItem -Recurse $locationToMonitor | Select-Object 

CategoryInfo : ReadError: (C:\CI-Cor\kexin...modules\bl\test:String) [Get-ChildItem], PathTooLongException
FullyQualifiedErrorId : DirIOError,Microsoft.PowerShell.Commands.GetChildItemCommand

From #154

@ferventcoder ferventcoder changed the title When using Write-FileUpdateLog to access long path, it's failed when the path more than 256 characters. When using Write-FileUpdateLog to access long path, it fails when the path more than 256 characters. Mar 9, 2015
@ferventcoder ferventcoder changed the title When using Write-FileUpdateLog to access long path, it fails when the path more than 256 characters. When using Write-FileUpdateLog to access long path, it fails when the path more than 260 characters Mar 9, 2015
@ferventcoder ferventcoder changed the title When using Write-FileUpdateLog to access long path, it fails when the path more than 260 characters Write-FileUpdateLog fails when the path is more than 260 characters Mar 9, 2015
@ferventcoder
Copy link
Member

Thanks for splitting that up! :)

@ferventcoder ferventcoder added this to the 0.9.10 milestone May 11, 2015
@ferventcoder ferventcoder modified the milestones: 0.9.10, 0.9.10.1 Oct 3, 2015
@asgerhallas
Copy link

@ferventcoder do you know if mongodb will be correctly installed, regardless of this error?

@ferventcoder
Copy link
Member

@asgerhallas That's a good question. I don't know that this is called anymore in choco 0.9.9+. If it is, I want to remove it completely.

For whether mondodb, I can't say. If there is an error, choco considers the install not successful, but the software may be successfully installed on the machine.

@asgerhallas
Copy link

@ferventcoder thank you for the reply! I'm running v0.9.9.11 so something seems to be called still... but I have not seen the message for other packages than mongodb, so far. I'm pretty new to chocolatey, but let me know if I can help with this issue in any way.

@ferventcoder
Copy link
Member

I wonder if the package itself calls the function then?

@asgerhallas
Copy link

It does not look like it, but I'll try to run it again and see if I can get af stack trace.

@asgerhallas
Copy link

@ferventcoder it doesn't really output a proper stack trace, but further inspection leads me to Install-ChocolateyZipPackage that still calls Write-FileUpdateLog. And Install-ChocolateyZipPackage is actually called by the mongodb script. Is that considered a problem with the mongo-script or chocolatey?

@ferventcoder
Copy link
Member

That would be Chocolatey. Thanks for tracing that.

@asgerhallas
Copy link

@ferventcoder My pleasure :) Let me know if there's anything else I can do to resolve the issue.

@ferventcoder
Copy link
Member

For choco itself, this issue is fixed by no longer using this. Which was done as part of #616.

@ferventcoder
Copy link
Member

Deprioritizing from 0.9.10 and moved the priority to low as the Choco helpers no longer use this helper. We should move it to deprecated and remove it by v1.

@Roksolanaa
Copy link

Long Path Tool help me a lot when i have an issue like file deleting or renaming the file. Also good to use if file name and file extension is too long.

@AdmiringWorm
Copy link
Member

Since the cmdlet Write-FileUpdateLog is deprecated and will be removed as part of the next release of Chocolatey, this problem will not be fixed, unfortunately. As such I will be closing this issue now.

Please see #2469 to track which cmdlets will be removed in the next version of Chocolatey.

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

6 participants
@ferventcoder @lygstate @asgerhallas @AdmiringWorm @Roksolanaa and others