On 10/23/23 18:32, Pavel Sanda wrote:
On Mon, Oct 23, 2023 at 11:30:44PM +0200, Enrico Forestieri wrote:
There is one point I'm not sure about - is it really true that windows still
set default limit for max path length to ~260 chars?
Yes, the APIs are still limited to that length:
$ grep MAX_PATH /usr/include/w32api/minwindef.h
#define MAX_PATH 260
That's bad news.
I'll refrain from making rude comments about Windows. That always gets
me in trouble.
If so it might be good use shorter hash for windows. I previously used sha-256
resulting in +65 chars, but we could swicth to sha-1 (41 chars) or turn it off
altogether for windows. Any opinion about that?
I suggest to simply using a counter also in the html export case and forget
about encrypted paths. I mean, simply use a progressive number and name of
file.
There is a reason I dropped the counter for xhtml. Unlike latex export the
mangled names are used in final export directory. Unfortunately the counter
numbers can be completely different across different LyX sessions. Different
ordering of opened files or editing the file itself will change them. So
if you export couple of times there is increasing number of forgotten mangled
images in the export directory and it quickly becomes mess (tested).
I remember this, actually.
Could you (i) use a shortened mangled path and (ii) append an md5 of the
absolute path? I'd be very surprised if we actually saw collisions in
this case. If so, we could take emergency measures.
Riki
--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel