13.05 - problem with -stay_open when WindowsLongPath == 1

Started by herb, December 05, 2024, 09:28:54 AM

Previous topic - Next topic

herb

Hello Phil, hello Frank

I updated Exiftool to version 13.05 on my Windows 10 system.
My application sends commands via pipes using the -stay_open feature.

Each command sent via pipe is rejected. Also ExifToolGui says "pipe is broken" when the latest version is used.
After lots of trials I found that option "WindowsLongPath" must be set to 0.

With this setting my application and also ExifToolGui has no problems to communicate with ExifTool.

Thanks for your help in advance
Best regards
herb 

FrankB

I can confirm 13.05 introduces this error. I can't even make it work with WindowsLongPath=0 in GUI.

@Phil: If you want me to test something let me know.

Edit: Changing only 'WindowsLongPath',  1 to undef in ExifTool.pm makes it work again

Phil Harvey

Ooops.  Thanks.  This will need an immediate fix.

What argument are you using for -stay_open?  Is it "-"?

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

FrankB

initially:
-stay_open True -@ -
every request:
-@ + CRLF + <ARG_FILE>

Phil Harvey

Right, thanks.  It is the -@ argument I needed.

I have reverted the change and released 13.06 until I can sort this out.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

FrankB

Confirmed: 13.06 Works.

As said: If you want help testing, let me know.

Apart from this little inconvenience I think the WindowsLongPath works quite well. I have released GUI 6.3.6 Nov 12, that has this option on by default. About 4500 Downloads now, and no problems reported.

Phil Harvey

Thanks Frank,

Could you test these 2 changes to lib/Image/ExifTool.pm?:

1. Set the default WindowsLongPath back to 1 at line 1176:

    [ 'WindowsLongPath',  1,      'enable support for long pathnames (enables WindowsWideFile)' ],
2. Add this line before the first "if" statement in EncodeFileName at line 4631:

    return 0 if $file eq '-';   # special case for stdin pipe
I think this may fix the issue.

- Phil

...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

FrankB

This does indeed fix the problem. Patches applied to 13.06 of course.

I will use this for the time being. If anything weird shows up, I will notify you.

Thanks

Phil Harvey

...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Phil Harvey

I haven't heard anything more, so I've gone ahead and released 13.07 with this patch.  Fingers crossed this time.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

herb

Hello Phil,

thanks for the patch to ExifTool 13.06.
Today I had time to test the patches and it works for me.

Best regards
herb

Edit:
Writing this I have seen that you released 13.07.
Thanks for this version

FrankB

Hello Phil,

Meanwhile had a quick look at 13.07. Works well with WindowsLongPath=1 and GUI! Thanks.
Maybe mention this in the 'Known Problems' section of the main page?

https://exiftool.org/#problems

Frank

Phil Harvey

Hi Frank,

Thanks for pointing this out.  I've updated the home page accordingly.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).