Bug opening files with overlong paths (259+ characters)

Things you’d like to miss in the future...
Forum rules
When reporting a bug, please include the following information: your XYplorer version (e.g., v27.90.0047), your Windows version (e.g., Win 11), and your screen scaling percentage (e.g., 125%). We recommend adding your Windows version and screen scaling percentage to your profile or signature. This will make debugging much easier for us.
admin
Site Admin
Posts: 64833
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Bug opening files with overlong paths (259+ characters)

Post by admin »

Here's my next shot: viewtopic.php?p=220787#p220787

Julia1995
Posts: 11
Joined: 13 May 2024 20:06

Re: Bug opening files with overlong paths (259+ characters)

Post by Julia1995 »

I tested v25.90.0154 and it does the same thing as v25.90.0152. The context menu still tries to use the overlong paths instead of 8.3 short names. :(

I also have the Long Paths setting enabled on my Windows 10.

admin
Site Admin
Posts: 64833
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Bug opening files with overlong paths (259+ characters)

Post by admin »

Strange, it worked on my long path enabled Windows 10. Or are you using the 64-bit context menu?

Julia1995
Posts: 11
Joined: 13 May 2024 20:06

Re: Bug opening files with overlong paths (259+ characters)

Post by Julia1995 »

No, I am using the standard context menu. For testing, I use a fresh instance of XYplorer and default settings. Scripting > Run Script > Fresh

I've been testing overlong video files with VLC Player. Are you testing with the same program?

admin
Site Admin
Posts: 64833
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Bug opening files with overlong paths (259+ characters)

Post by admin »

I have now tested it with VLC Player on long path aware Win10 and can confirm what you see. The DOS 8.3 is correctly passed to the shell context menu, and then Windows takes over and apparently (black box) converts that path back to a long path internally before passing it to VLC. Nothing I can do about that. :|

admin
Site Admin
Posts: 64833
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Bug opening files with overlong paths (259+ characters)

Post by admin »

PS: Does it work via context menu when you open it in File Explorer?

Julia1995
Posts: 11
Joined: 13 May 2024 20:06

Re: Bug opening files with overlong paths (259+ characters)

Post by Julia1995 »

admin wrote: 18 May 2024 18:49 PS: Does it work via context menu when you open it in File Explorer?
Yes.
admin wrote: 18 May 2024 09:32 The DOS 8.3 is correctly passed to the shell context menu, and then Windows takes over and apparently (black box) converts that path back to a long path internally before passing it to VLC. Nothing I can do about that. :|
Interesting... I think I found a solution! :)

In the XYplorer app manifest, there is a "longPathAware" flag since v24.80. It seems this setting causes Windows to convert the 8.3 paths from XYplorer back into overlong paths, breaking some apps.

I removed the "longPathAware" flag by editing the manifest file with an app called Resource Hacker, and now the XYplorer context menu successfully opens overlong files! :)

Please try removing this flag from the manifest, and recompiling XYplorer. Overlong paths are working perfectly for me now!

 
Attachments
1.png
1.png (73.1 KiB) Viewed 1334 times

admin
Site Admin
Posts: 64833
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Bug opening files with overlong paths (259+ characters)

Post by admin »

Wow, good find! :beer: I'll check that.

admin
Site Admin
Posts: 64833
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Bug opening files with overlong paths (259+ characters)

Post by admin »

Note that longPathAware was added to the manifest in v24.80.0020 - 2023-08-21 17:46. Probably this alone was/is responsible for the opening problems you were/are having? (You can check by testing an older version from the freezer: https://www.xyplorer.com/freezer.php)

Note that longPathAware in the manifest also has good effects: E.g. you get a shell context menu for overlong items.

The real problem here is the VLC application, not XYplorer. They're the ones that should handle long paths properly.

JohnM
Posts: 272
Joined: 08 Jun 2006 11:59
Location: Windows 11 Pro @100%

Re: Bug opening files with overlong paths (259+ characters)

Post by JohnM »

This might not be related, but since around version 25.90.0148 onwards XY has been misbehaving when it comes to passing arguments that contain spaces to commands.

I have a number of bash scripts that I run from XY. These bash scripts take the selected entries from the list view as arguments.

For example I have a folder called "Test folder one".
If I select this folder in the LV and run one of my bash scripts, under XY 25.90.0147 the script receives a single argument "D:\Users\John\Documents\Test folder one".
If I run the same under XY 25.90.0155, the script receives three arguments "D:\Users\John\Documents\Test", "folder" and "one".

Cheers
John
Windows 11 Pro x64
XYplorer 28.80.0588 x64 beta

admin
Site Admin
Posts: 64833
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Bug opening files with overlong paths (259+ characters)

Post by admin »

Ah, thanks for the hint. Should work again next beta.

Julia1995
Posts: 11
Joined: 13 May 2024 20:06

Re: Bug opening files with overlong paths (259+ characters)

Post by Julia1995 »

admin wrote: 18 May 2024 23:08 Note that longPathAware was added to the manifest in v24.80.0020 - 2023-08-21 17:46. Probably this alone was/is responsible for the opening problems you were/are having? (You can check by testing an older version from the freezer: https://www.xyplorer.com/freezer.php)
v24.60: overlong paths work perfectly -- because XYplorer opens them using 8.3 short names

v24.80: overlong paths start to break -- because of longPathAware, XYplorer now opens the *huge* overlong paths directly, breaking many apps with the "MAX_PATH" limit of 260 characters.

v25.90.0154 beta: double clicking overlong files was fixed and now uses 8.3 names -- BUT the context menu still uses overlong names because of longPathAware (forced conversion of 8.3 names to overlong on the shell)

Ironically, it seems the "longPathAware" flag tells Windows to no longer use 8.3 short names when opening overlong files in XYplorer. But this breaks many programs! :)

admin wrote: 18 May 2024 23:08 Note that longPathAware in the manifest also has good effects: E.g. you get a shell context menu for overlong items.
When I disable longPathAware in the newest beta version, the context menu now works perfectly for overlong items. It actually *FIXES* the issues with VLC Player, Notepad++, context menu, shell extensions, and other programs. :tup:

It's a weird quirk in Windows! Please try disabling longPathAware and opening overlong files (both in the context menu + also double clicking). It solves all my issues.

JohnM
Posts: 272
Joined: 08 Jun 2006 11:59
Location: Windows 11 Pro @100%

Re: Bug opening files with overlong paths (259+ characters)

Post by JohnM »

Ah, thanks for the hint. Should work again next beta.
Fixed now thanks
Windows 11 Pro x64
XYplorer 28.80.0588 x64 beta

admin
Site Admin
Posts: 64833
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Bug opening files with overlong paths (259+ characters)

Post by admin »

Julia1995 wrote: 19 May 2024 21:56 Please try disabling longPathAware and opening overlong files (both in the context menu + also double clicking). It solves all my issues.
As I said, longPathAware also has its advantages, and I have at least one app, that *only* can open overlong files when longPathAware is in the manifest. It cannot handle 8.3 paths. And it's likely that less and less apps can handle 8.3 paths. longPathAware is the future, 8.3 paths is just backward compatibility.

jupe
Posts: 3292
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Bug opening files with overlong paths (259+ characters)

Post by jupe »

Your requests are probably better placed here

https://code.videolan.org/videolan/vlc/-/issues/25640
https://code.videolan.org/videolan/vlc/-/issues/24246

Or if you really wanted to, you should be able to write a quick batch file to modify the manifest using ResHacker.

Post Reply