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

File with the long path can't be opened #338

Open
cadappl opened this issue Apr 30, 2022 · 2 comments
Open

File with the long path can't be opened #338

cadappl opened this issue Apr 30, 2022 · 2 comments

Comments

@cadappl
Copy link

cadappl commented Apr 30, 2022

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.

@gobbedy
Copy link

gobbedy commented Sep 22, 2022

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 )

@stoppeye
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants