kitodo / kitodo-production

Kitodo.Production is a workflow management tool for mass digitization and is part of the Kitodo Digital Library Suite.
http://www.kitodo.org/software/kitodoproduction/
GNU General Public License v3.0
64 stars 63 forks source link

Changed process title on creating symbolic link in the home directory of a user #6178

Open henning-gerhardt opened 3 months ago

henning-gerhardt commented 3 months ago

Describe the bug On calling the used script_createSymLink script the second parameter contains the name of the to be used link. In former times this was the process title but now it is a transformed process.

Some examples:

process title generated link name
DasNeRu_47771594X-19270110 DasNeRu_47771594X_19270110__[process_id]
denuor._32521638X denuor32521638X[process_id]

I ommitted the real process ids here as they are not part of the issue.

Its look to me that everything in the processtitle which is not a character sign, number or _ get replaced by _. This is may be useful for . character but even for - character? Is there a list which characters got replaced and which not?

Is this a indented behaviour or or can this be adjusted by an other configuration option or just a bug?

Expected behavior The process title should be taken as a link name or at least should be unmodified used on the script call to it can be changed inside the script if different characters are causing problems

Release 3.6.0

henning-gerhardt commented 3 months ago

This behaviour is still existing in release 3.7.0.

BartChris commented 3 months ago

It seems like we are explicitely replacing everything which is not a a number or a letter by underscore ("_") https://github.com/kitodo/kitodo-production/blob/0e6e0ee5dfe7e88ebb07889bb052b32e5536928d/Kitodo/src/main/java/org/kitodo/production/helper/WebDav.java#L227-L231

henning-gerhardt commented 3 months ago

Thank you @BartChris for pointing me in the right direction. Hard coded replacements in depending on a process property value which results different link names. I don't know why this was introduced but this is a good explanation for the current behaviour.