spakin / SimpInkScr

Simple Inkscape Scripting
https://inkscape.org/~pakin/%E2%98%85simple-inkscape-scripting
GNU General Public License v3.0
320 stars 31 forks source link

Very long file names in tests #89

Closed eeucalyptus closed 1 year ago

eeucalyptus commented 1 year ago

I'm using the plugin in Ubuntu 22.04 with an ext4-filesystem. The long file names in the tests sub-dir make the absolute paths exceed the 255 character limit for ext4. I can still use the plugin if I just leave out the tests dir. But having errors already when cloning the repo is not ideal. Please reduce the filenames to a reasonable length.

spakin commented 1 year ago

I guess I must be using shorter directory names than you, as I haven't run into this problem myself.

The source of the long names is the inkex.tester.ComparisonMixin class, which starts with the extension subdirectory and name (simpinkscr.simple_inkscape_scripting) and appends the complete program, hashing it only if it exceeds 127 characters. With help from Jonathan Neuhauser and Martin Owens, I managed to override inkex.tester.ComparisonMixin and force it to generate names of the form sis_hash.out (a 41-character base name).

I'll soon push out this modification to GitHub.