Page 1 of 3
Bug opening files with overlong paths (259+ characters)
Posted: 13 May 2024 22:35
by Julia1995
Hello and thank you for developing a wonderful app like XYplorer!
I have encountered some bugs regarding overlong filepaths. Here is what I found.
Versions 24.80 and later of XYplorer can fail to open files when their total path length is longer than 259 characters.
Previous versions of XYplorer (such as 24.60) successfully open overlong filepaths by using the DOS 8.3 short filenames.
According to the changelog, a "longPathAware" flag was added to the application manifest in version 24.80.
Using an app called Process Explorer to inspect the shell commands, it seems XYplorer now tries to directly open overlong filepaths instead of using the 8.3 short names. Some programs cannot handle these overlong paths and fail to open.
POTENTIAL FIX: I believe XYplorer should try to open overlong filepaths using DOS 8.3 short names. This seems to be the behavior of XYplorer 24.60 and earlier, and it should improve compatibility opening files in older applications.
TIP: Enable the "Show Name Length While Renaming" option in XYplorer for easier testing. I tested both TXT and JPEG files with overlong paths. The files should be placed in a folder with a long name (200+ characters), and then adjust the filename so the total path length is over 259 characters. Try to open the overlong files from XYplorer, and then shorten the names and try again.
Thank you, and let me know if you need more information!
Re: Bug opening files with overlong paths (259+ characters)
Posted: 14 May 2024 11:06
by admin
Thanks for the report!
- How do you try to open the files, context menu? Double click?
- What type of file is it?
- What is the opening application?
Re: Bug opening files with overlong paths (259+ characters)
Posted: 15 May 2024 01:21
by Julia1995
Hello, the bug occurs when double clicking certain files in XYplorer with overlong PATHS (folder length + filename length > 259 chars).
Popular apps like VLC Player (video player) and Notepad++ (text editor) cannot handle overlong files when opened by XYplorer. However, they can open 8.3 short filenames!
Here are steps to reproduce for VLC Player (you can also do similar steps for Notepad++):
NOTE: VLC Player needs to be installed and set to the default video player with file associations.
1) In latest version of XYplorer, enable the "Show Name Length While Renaming" option we can see the length of file paths. The setting is in the config menu "General > Sort and Rename"
2) Go to C:\ drive and create a new folder that is 200 characters long.
3) Copy a video file into this folder.
4) Rename the video file and make sure the total path length is less than 260 characters. Double click the video to open it in VLC Player.
5) IMPORTANT: Now rename the file and make it longer (60+ chars) so that its total path length (FOLDER LENGTH + FILENAME LENGTH) is over 260 characters.
6) Double click the file and it should fail to open
7) Shorten the filename again (so the total path length is less than 260 chars) and it should now open
I believe the fix would be for XYplorer to open files with overlong paths (greater than 259 chars) using 8.3 DOS short names (for example "C:\DOWNLO~1\NEWAWE~1.TXT")
NOTE: XYplorer 24.60 and earlier don't have this bug because they use 8.3 filenames for overlong paths. I verified this by double clicking overlong files and checking the XYplorer.exe shell command in Process Explorer. XYplorer 24.80 and later pass the HUGE overlong filepath on the shell causing trouble with some older apps!
Re: Bug opening files with overlong paths (259+ characters)
Posted: 15 May 2024 18:14
by admin
Thanks. Select one of those overlong path files, and click menu File | To Clipboard | Item Short Path/Name(s). Is the correct short path copied to the clipboard?
Re: Bug opening files with overlong paths (259+ characters)
Posted: 15 May 2024 20:24
by Julia1995
No, the overlong path (300+ chars) is copied to the clipboard instead of the short path
If you can fix this in a beta build, I would be happy to help you test it.

Re: Bug opening files with overlong paths (259+ characters)
Posted: 15 May 2024 21:27
by admin
Have you tested 24.60 on the same machine? Because I just tested 24.50 and it behaves no different than 25.90.
Sorry, that was wrong. I have 8dot3 name creation per volume enabled (NtfsDisable8dot3NameCreation = 2), and I have it enabled for C: but not for E: (that can be done using fsutil).
Turns out I can confirm what you said. Working on the fix...
Re: Bug opening files with overlong paths (259+ characters)
Posted: 15 May 2024 22:47
by admin
OK, should be fixed in next beta.
Note that I was not as wrong as I thought, at least I could not reproduce that versions 24.60 and earlier could do it. But the next beta will.

Re: Bug opening files with overlong paths (259+ characters)
Posted: 16 May 2024 22:22
by Julia1995
Thank you, I have downloaded and tested the new beta version. Here is what I found.
1) Using the menu option "File | To Clipboard | Item Short Path/Name(s)" now successfully copies the short paths.
2) Double clicking (or using context menu) to open overlong files in XYplorer still does
not use the short names.

I have 8dot3 name creation enabled on all my drives. Here are some pictures:
Re: Bug opening files with overlong paths (259+ characters)
Posted: 16 May 2024 23:04
by admin
Indeed!

Try 25.90.0151.
Re: Bug opening files with overlong paths (259+ characters)
Posted: 17 May 2024 02:28
by Julia1995
I tried the newest beta and overlong files still don't open when double clicked.
On the event handler for opening files, does XYplorer get 8.3 short names before opening overlong files? Maybe the code is only checking file *name* length instead of total path length? (folder path + filename > 259 chars)
Re: Bug opening files with overlong paths (259+ characters)
Posted: 17 May 2024 09:34
by admin
No, everything here is done correctly and works perfectly. There must be another factor. Can anyone else reproduce overlong items still not opening in applications that do not support overlong items?
Re: Bug opening files with overlong paths (259+ characters)
Posted: 17 May 2024 13:24
by admin
On a LongPathAware Windows 10, I could see problems with overlong items, and have now fixed them (25.90.0152). However, I could not reproduce your problem, so it remains a thrill.
Re: Bug opening files with overlong paths (259+ characters)
Posted: 17 May 2024 19:33
by Julia1995
Yes, I am using LongPathAware Windows 10 64-bit. I'm sorry I did not mention that. Windows is weird sometimes, lol
I tested the newest beta version v25.90.0152.
1) Good news -- overlong files now successfully open when double clicked! Nice job!
2) Bad news -- when right-clicking overlong files and opening with context menu, XYplorer does *not* use the short names. Check out my screenshots.
Re: Bug opening files with overlong paths (259+ characters)
Posted: 17 May 2024 19:36
by admin
Julia1995 wrote: ↑17 May 2024 19:33
2) Bad news -- when right-clicking overlong files and opening with context menu, XYplorer does *not* use the short names. Check out my screenshots.
News? Does that mean it was not the case with v25.90.0151?
Re: Bug opening files with overlong paths (259+ characters)
Posted: 17 May 2024 19:52
by Julia1995
For v25.90.0151, *both* double clicking and context menu did *not* open the overlong files.
For v25.90.0152, double clicking now successfully opens overlong files, but the context menu does not.
