NppFTP icon indicating copy to clipboard operation
NppFTP copied to clipboard

File with the long path can't be opened

Open cadx64 opened this issue 3 years ago • 2 comments
trafficstars

Description of the Issue

NppFTP uses the cache paths to store the remote files. If the remote file, for example, the Java class file, is put in deep directories and has a long filename, the length of the filename is beyond MAX_PATH (260 characters). The situation becauses common if NppFTP is used to work with Android source code with Ubuntu.

https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation introduced the solution. It's apprecicated that NppFTP can have the improvement.

Steps to Reproduce the Issue

  1. Create the file /tmp/abcdefghijklmnopqrstuvwxyz01234567890/abcdefghijklmnopqrstuvwxyz01234567890/abcdefghijklmnopqrstuvwxyz01234567890/abcdefghijklmnopqrstuvwxyz01234567890/abcdefghijklmnopqrstuvwxyz01234567890/abcdefghijklmnopqrstuvwxyz01234567890/abcdefghijklmnopqrstuvwxyz01234567890/0
  2. Try to open the file with NppFTP

Expected Behavior

File won't be downloaded from the reomote.

Actual Behavior

File can be downloaded from the reomote.

cadx64 avatar Apr 30 '22 14:04 cadx64

I have the same issue. To add to what @cadappl said, it seems that the solution is simply to add this to notepad++'s application manifest:

    <windowsSettings xmlns:ws2="http://schemas.microsoft.com/SMI/2016/WindowsSettings">
        <ws2:longPathAware>true</ws2:longPathAware>
    </windowsSettings>

ie to this file: https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/PowerEditor/src/notepad%2B%2B.exe.manifest

This is based on the link shared by @cadappl (https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation )

gobbedy avatar Sep 22 '22 04:09 gobbedy

@gobbedy: thanks for this hint! But I guess this is only useful, if you do your own build, correct?

stoppeye avatar Sep 27 '23 07:09 stoppeye