Page 1 of 1

0.93.1 : adding metadata fails silenciously if path is too long

Posted: Mon Sep 30, 2019 3:59 pm
by XavierR
XnView: MP 0.93.1 - 64 bit
OS: Windows 10 64bit

I tried to add metadata (IPTC-IIM/XMP) on some photos which are stored on my office files server, with a very long path and a big file name. When I click on "Write" or "Write the files", progress bar appears, but then no change has been written in the files.

Effect: No warning and no new metadata too.

To reproduce:
1.Use photos stored with the maximal lenght path of your system. In my case the whole path uses 248 characters.
2. Select photo(s) and edit IPTC-IIIM/XMP (CTRL+I)
3. Click on Write / Write the files --> Progress bar appears and disappear

Actual behaviour (bug): No warning and no new metadata too. :bug:

Expected behaviour: If metadata ca'nt be written using a workaround, we have to advised that the operation (of metadata update) has failed.

Re: 0.93.1 : adding metadata fails silenciously if path is too long

Posted: Mon Sep 30, 2019 4:14 pm
by XavierR
At the beginning, I didn't understood why for some photos, metadatata editing works and why it fails for another... I finally notice that some temporary files where writed in the directory during the operation. I finally understood (because I ever experimented some problems with some too long paths on our server) that it was path length which prevent XnViewMP to create temporary file if maximal length was reached.

So workaround for the user is really simple : I just have to shorten my path (for example shorten a parent folder name) and metadata can be written.

But real problem is that :
  1. there is no warning message telling that metadata update will fail because of path length (but is it really possible?)
  2. there is no warning message telling that metadata update fails (lack of a control?)
  3. there is no warning message telling that metadata update has failed cause of path length (ok, it's a very special case, but...)

Re: 0.93.1 : adding metadata fails silenciously if path is too long

Posted: Wed Nov 13, 2019 1:43 pm
by xnview
:bugconfirmed: Thanks to your detailed description

Re: 0.93.1 : adding metadata fails silenciously if path is too long

Posted: Fri May 12, 2023 8:38 am
by xnview
and with latest version?

Re: 0.93.1 : adding metadata fails silenciously if path is too long

Posted: Wed Jun 07, 2023 8:22 pm
by AntonK
XavierR wrote: Mon Sep 30, 2019 3:59 pm [...] path uses 248 characters.
This seems to be an issue with the limit of 260 characters for paths in Windows.
It can be solved via the registry: just add/modify DWORD-value LongPathsEnabled (under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem) setting it to 1.