mrpiggi / svg

Handling SVG pictures in LaTeX documents using Inkscape, ImageMagick and/or Ghostscript
Other
65 stars 11 forks source link

Including two files by the same name results in duplication of the first file #51

Closed tecosaur closed 1 year ago

tecosaur commented 1 year ago

I'm using SVG v2.02, and I've just run into a bug where I'm doing the following:

\includesvg{subdir1/drawing.svg}
\includesvg{subdir2/drawing.svg}

This results in subdir1/drawing.svg being inserted twice, which isn't right...

Looking at the svg-inkscape directory, it's clear that only the file name is being used as a cache key, leading to incorrect results when files by the same name appear in different directories.

In this case, it was easy enough for me to rename one of the files, but it would be good if the cache mechanism could be adjusted to make the entire path part of the key (by hashing it for instance, e.g. 3a406d0e_drawing_svg-raw.pdf instead of drawing_svg-raw.pdf).

mrpiggi commented 1 year ago

See https://github.com/mrpiggi/svg/issues/11#issuecomment-525175569

Sorry, that I didn't tackle some enhancements so far, but I am really lacking time (for years...)