Skip to content

cached files with URL and filename > 260 characters issue and possible solution #4327

Closed
StarsbySea/scoop
#1
@42wim

Description

I'm making a manifest for Microsoft Edge and I'm getting the filename too long problem.

The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
URL http://msedge.f.tlu.dl.delivery.mp.microsoft.com/filestreamingservice/files/c6c3d5da-8cd4-4d17-a52d-9c1b4e9f4ff0?P1=1619294442&P2=404&P3=2&P4=W82qhGeOfF%2bacPu5vkB5FNoZKDucQJEnJ87E0P%2bMAYsiVsgr%2fsrFQA%2fnkdaAVPqIh6m%2b83hjYL%2fCtbpRhTCOXg%3d%3d#/dl.7z is not valid

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:

  • add the hash instead of the url
  • or make our own hash of $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 the cache directory and it works fine.

Any thoughts?
(I can make a PR for this)

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions