deal with attempt to export filename with # or ? to webdav

xporting files with '#' or '?' in their name won't work because urls get
truncated on those. Fail in a better way in this case, and avoid failing
when removing such files from the export, so after the user has renamed the
problem files the export will succeed.
This commit is contained in:
Joey Hess 2019-02-07 13:47:57 -04:00
parent d5c435d3dc
commit 60c1b5c994
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
5 changed files with 78 additions and 26 deletions

View file

@ -0,0 +1,18 @@
[[!comment format=mdwn
username="joey"
subject="""comment 1"""
date="2019-02-07T17:11:22Z"
content="""
I guess that "#" and "?" in a webdav path is just not possible, since
the path becomes part of the url that is used. It might even be legal for a
webdav server to cut those off the url and store data to the basename,
which could overwrite another file that shared that basename.
I don't like escaping those somehow, because the user should expect to see
the same filenames in the export that they have in their tree. So exporting
should fail. And removal should can succeed without doing anything, to
let it recover, which is ok since the file content is certianly not located
at an url containing either of those characters.
I think that S3 might have the same problem, have not tried it yet.
"""]]

View file

@ -0,0 +1,7 @@
[[!comment format=mdwn
username="joey"
subject="""comment 2"""
date="2019-02-07T17:47:06Z"
content="""
Fixed for webdav, still need to check S3.
"""]]