Wildcard treated literally for paths in quotes by pdftk-java
jackfiszr opened this issue · comments
Due to some deprecation issues, a port of the original pdftk – pdftk-java – is now the standard pdftk for Debian.
Unfortunately when using a wildcard and at the same time enclosing the file path in quotes, pdftk-java tries to open a file that actually contains ‘*’ in it’s name and of course is not able to find it.
A simple fix would be to change shellescape([file.replace(/\\/g, '/')])
to [file.replace(/\\/g, '/').replace(/ /g, '\\ ')]
and escape spaces instead of adding quotes.
Arguably this could also be reported as an issue to https://gitlab.com/pdftk-java/pdftk/issues