Git Product home page Git Product logo

Comments (5)

peteraritchie avatar peteraritchie commented on June 29, 2024 1

What LongPath does is to sneak UNC into the mix to support up to 32k characters per path to avoid the PathTooLongException. UNC still has limitations on each component (filename, directory name, etc.). Depending on the volume, the component limit is 255. The filename in your example is 256 characters. When a UNC component is longer that 255 Windows responds with an error 123 (ERROR_INVALID_NAME). When LongPath encounters that error, it translates it to ArgumentException. The same error in .NET would cause an IOException with the same message and HResult. The fix would be to correct that use of ArgumentException to be compatible with .NET

from longpath.

alkampfergit avatar alkampfergit commented on June 29, 2024

Actually the problem is a really too long filename, i'd like to have simply a better error message telling that the filename is simply too long.

from longpath.

alkampfergit avatar alkampfergit commented on June 29, 2024

I've opened the bug because we found this error on a log with a filename full of weird characters, and we were absolutely sure that one of the char was the issue, then we find that is a simple filename too long. :).

from longpath.

peteraritchie avatar peteraritchie commented on June 29, 2024

I've opened the bug because we found this error on a log with a filename full of weird characters, and we were absolutely sure that one of the char was the issue, then we find that is a simple filename too long. :).

Amusingly, a file name can only be up to 255 characters in a UNC filename. If you don't use UNC, you can get a 260 character file name in the root of the drive :)

from longpath.

alkampfergit avatar alkampfergit commented on June 29, 2024

Windows FileSystems are always amazing :D.

from longpath.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.