Open BrianJKoopman opened 4 years ago
Definitely a bug, the interfaces should sanitize file paths for things like trailing slashes. Other fun things to think about are trailing /.
, internal /../
, etc.
We can probably handle most of these issues in a self-consistent way by using pathlib
to canonicalize file/directory paths as part of uploading. I can try to take a stab at this in the next ~week or so.
I realize I'm probably breaking the rules in my file naming during manual testing and that this case might not come up when programmatically uploading directories, but in testing I've successfully uploading directories with
{local-path}
containing a trailing slash:However, I find that if I have a trailing slash on the
{dest-path}
(might be easy to do manually if tab completing a directory and not giving the destination any parent directory), things go wrong:The librarian webpage then reports a file existing with the name of ' ':
I understand why, given the rules for naming, this might error out, but I think the ' ' file registering might be a bug.