Notepad3 icon indicating copy to clipboard operation
Notepad3 copied to clipboard

Feature request: long path support

Open retaw106 opened this issue 4 years ago β€’ 4 comments

It seems that Notepad3 only support paths shorter than 255 characters.

Traditionally, windows only support path shorter than 260. But win10 can be configured to enable long paths, see Maximum Path Length Limitation. But notepad3 can't open long path file even after I configure the system.

Wish to add long path support.

Thanks

retaw106 avatar Aug 19 '21 07:08 retaw106

Traditionally, windows only support path shorter than 260. But win10 can be configured to enable long paths,

What about the Windows 7 users ? πŸ€”

hpwamr avatar Aug 19 '21 09:08 hpwamr

Traditionally, windows only support path shorter than 260. But win10 can be configured to enable long paths,

What about the Windows 7 users ? πŸ€”

I guess this longPathAware element may recognize the system intelligently. But I'm not good at windows development, so I can't validate this guess.

If not, is it able to add a check function, to manually judge the path length for windows version < 10 and windows 10 without this registry key configured?

retaw106 avatar Aug 20 '21 02:08 retaw106

In my searching, I find this post Opt-in to new Win32 API that allows paths longer than 260 characters. It seems cmake allows long paths even for windows 7.

I downloaded cmake's source code and find this function Encoding::ToWindowsExtendedPath. But I cannot understand it😦

retaw106 avatar Aug 20 '21 02:08 retaw106

The problem is, caused by historic reasons, Notepad3 internally uses, for nearly all file path objects, a static buffer allocated with fixed length of MAX_PATH. These objects are scattered all over Notepad3's source code core and must be changed. A migration to long paths is a larger project which has to be implemented carefully (see *Ref) and tested well - so it needs some time and needs to be prioritized too (means the probability for implementation has factors: priority * (1/effort) * leisure * (...). The factor the community can influence is "priority" πŸ˜‰. Thank you very much for suggestion and provided references. *Ref: https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file

RaiKoHoff avatar Aug 20 '21 07:08 RaiKoHoff