Files icon indicating copy to clipboard operation
Files copied to clipboard

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

Open Josh65-2201 opened this issue 1 year ago • 9 comments

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\%USERNAME%\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

Josh65-2201 avatar Feb 29 '24 00:02 Josh65-2201

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.

0x5bfa avatar Feb 29 '24 06:02 0x5bfa

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.

ezxpro avatar Mar 22 '24 20:03 ezxpro

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.

samcarrier avatar Sep 14 '24 21:09 samcarrier

Not yet

Josh65-2201 avatar Sep 14 '24 21:09 Josh65-2201

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

samcarrier avatar Sep 14 '24 21:09 samcarrier

@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

disco-unixg avatar Oct 31 '24 17:10 disco-unixg

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

0x5bfa avatar Nov 01 '24 04:11 0x5bfa

Any news on this? Thanks a lot

ghost avatar Apr 10 '25 19:04 ghost

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

yaira2 avatar Apr 10 '25 19:04 yaira2