ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: herb on December 05, 2024, 09:28:54 AM

Title: 13.05 - problem with -stay_open when WindowsLongPath == 1
Post by: herb on December 05, 2024, 09:28:54 AM
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 
Title: Re: 13.05 - problem with -stay_open when WindowsLongPath == 1
Post by: FrankB on December 05, 2024, 10:11:30 AM
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
Title: Re: 13.05 - problem with -stay_open when WindowsLongPath == 1
Post by: Phil Harvey on December 05, 2024, 11:48:58 AM
Ooops.  Thanks.  This will need an immediate fix.

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

- Phil
Title: Re: 13.05 - problem with -stay_open when WindowsLongPath == 1
Post by: FrankB on December 05, 2024, 12:00:19 PM
initially:
-stay_open True -@ -
every request:
-@ + CRLF + <ARG_FILE>
Title: Re: 13.05 - problem with -stay_open when WindowsLongPath == 1
Post by: Phil Harvey on December 05, 2024, 12:09:30 PM
Right, thanks.  It is the -@ argument I needed.

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

- Phil
Title: Re: 13.05 - problem with -stay_open when WindowsLongPath == 1
Post by: FrankB on December 05, 2024, 02:44:02 PM
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.
Title: Re: 13.05 - problem with -stay_open when WindowsLongPath == 1
Post by: Phil Harvey on December 05, 2024, 03:09:38 PM
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

Title: Re: 13.05 - problem with -stay_open when WindowsLongPath == 1
Post by: FrankB on December 05, 2024, 03:53:26 PM
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
Title: Re: 13.05 - problem with -stay_open when WindowsLongPath == 1
Post by: Phil Harvey on December 05, 2024, 04:00:16 PM
Great, thanks.

- Phil
Title: Re: 13.05 - problem with -stay_open when WindowsLongPath == 1
Post by: Phil Harvey on December 11, 2024, 12:40:02 PM
I haven't heard anything more, so I've gone ahead and released 13.07 with this patch.  Fingers crossed this time.

- Phil
Title: Re: 13.05 - problem with -stay_open when WindowsLongPath == 1
Post by: herb on December 11, 2024, 01:38:13 PM
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
Title: Re: 13.05 - problem with -stay_open when WindowsLongPath == 1
Post by: FrankB on December 11, 2024, 04:36:08 PM
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 (https://exiftool.org/#problems)

Frank
Title: Re: 13.05 - problem with -stay_open when WindowsLongPath == 1
Post by: Phil Harvey on December 11, 2024, 05:21:52 PM
Hi Frank,

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

- Phil