-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
cached files with URL and filename > 260 characters issue and possible solution #4327
Comments
StarsbySea
added a commit
to StarsbySea/scoop
that referenced
this issue
May 5, 2021
Fix: ScoopInstaller#4327 Normally, this function behaves as before when the cache filename is less than 260 characters long. The modified program is designed to shorten cached filenames while retaining as much complete URL information as possible. If the filename is greater than or equal to 260 characters in length, it will first attempt to remove everything after the question mark from the URL, and if it is still greater than 260 in length, only the filename in the URL will be retained. Tested locally and passed.
This was referenced May 5, 2021
I suggest using the sha1 of the URL to replace the original URL. |
StarsbySea
added a commit
to StarsbySea/scoop
that referenced
this issue
May 15, 2023
Fix: ScoopInstaller#4327 Normally, this function behaves as before when the cache filename is less than 260 characters long. The modified program is designed to shorten cached filenames while retaining as much complete URL information as possible. If the filename is greater than or equal to 260 characters in length, it will first attempt to remove everything after the question mark from the URL, and if it is still greater than 260 in length, only the filename in the URL will be retained. Tested locally and passed.
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm making a manifest for Microsoft Edge and I'm getting the filename too long problem.
I don't see anyway to make the URL shorter as this is the full URL, the problem is caused by the
cache
dir that caches apps with$app $version $url
https://github.com/lukesampson/scoop/blob/3d67b7d37c4a2714e8942724d4677dcbd3678f01/lib/install.ps1#L107
Is there any reason we actually need that URL there ?
$app $version
should be enough I think ?If not we can:
$app $version $url
Also I did enable the
LongPathsEnabled
in the registry and I'm on Windows 10 2004, but this didn't fix the issue.I'm now running a fork with only
$app $version
in thecache
directory and it works fine.Any thoughts?
(I can make a PR for this)
The text was updated successfully, but these errors were encountered: