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

Feature: Add full support for \\?\ (256 character limit bypass) #14865

Open
Josh65-2201 opened this issue Feb 29, 2024 · 9 comments
Open

Feature: Add full support for \\?\ (256 character limit bypass) #14865

Josh65-2201 opened this issue Feb 29, 2024 · 9 comments

Comments

@Josh65-2201
Copy link
Member

Josh65-2201 commented Feb 29, 2024

What feature or improvement do you think would benefit Files?

\\?\ can be used to bypass the 256 characters limit windows has. Files however doesn't interact with it fully only being able to read the folder files and nothing else.

Can be tested using

mkdir "\\?\C:\Users\<Your user name here>\Downloads\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\FolderThatMakesPathToLong"

Requirements

  • Auto add \\?\ to path (This could probably be hidden to users as it doesn't change anything with smaller paths once the below is also fixed)
    • This should NOT be done for MTP devices (Compatibility should be checked on Network drives and FTP folders)
    • Alternatively could be added for path longer then 256 characters only
  • Add support for normal functions (Opening files, File operations, Creating new files, renaming existing ones, etc)
    • Commands would have to be absolute paths and not relative ones as it wont work.
    • Manual path / would have to be converted to \ before parsing
    • Recycle bin won't work with long paths for deleting, Make sure Permeant delete dialog and check shows following user setting

Files Version

3.2.4.0

Windows Version

10.0.22621.3155

Comments

No response

@yaira2 yaira2 moved this to 🔖 Ready to build in Files task board Feb 29, 2024
@0x5bfa
Copy link
Member

0x5bfa commented Feb 29, 2024

FYI https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation
I assume we're going to use CsWinRT server and Win32API. There's a list of functions that can be bypased.

@ezxpro
Copy link

ezxpro commented Mar 22, 2024

I made a relevant comment about this issue under #9531
It's perfectly possible to implement long path names, as the Windows API supports it and many apps are able to handle long pathnames.

It's not enough to disable this limitation in WIndows, though. The app has to implement this feature for it to work.

@samcarrier
Copy link

Is this being worked on? I am looking for a new file explorer and long file paths is the main reason why I am looking for an alternative file explorer.

@Josh65-2201
Copy link
Member Author

Not yet

@samcarrier
Copy link

For network path you would need to use : \?\UNC\ . I will see If I can find some time to work on it.

@disco-unixg
Copy link

@samcarrier Are you thinking about working on this? I have a need to support long pathnames and was thinking about tackling this as well. Was a software developer a long time ago but perhaps I can make a go of it, or work with you

@0x5bfa
Copy link
Member

0x5bfa commented Nov 1, 2024

Either way, I'll help you out understand the codebase and how storage access works if you have questions when working on.

@fullstackdesign-xyz
Copy link

Any news on this? Thanks a lot

@yaira2
Copy link
Member

yaira2 commented Apr 10, 2025

It's available if anyone wants to work on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🔖 Ready to build
Development

No branches or pull requests

7 participants