crashes with double rename
somehow the script got stuck in this loop here:
authenticated with webdav https://nc.torproject.net/remote.php/dav/files/dangerzone-bot/
sanitizing CVS/ dangerzone-processed/
moving dangerzone-processed/ to CVS//dangerzone-processing/dangerzone-processed/ before dangerzone-processing
Traceback (most recent call last):
File "./processor.py", line 405, in <module>
main()
File "./processor.py", line 307, in main
client.process_path(folder, path)
File "./processor.py", line 343, in process_path
self.move(remote_path_from=folder + "/" + path, remote_path_to=remote_processing_path)
File "/usr/lib/python3/dist-packages/webdav3/client.py", line 66, in _wrapper
res = fn(self, *args, **kw)
File "/usr/lib/python3/dist-packages/webdav3/client.py", line 575, in move
self.execute_request(action='move', path=urn_from.quote(), headers_ext=[header_destination, header_overwrite])
File "/usr/lib/python3/dist-packages/webdav3/client.py", line 226, in execute_request
raise ResponseErrorCode(url=self.get_url(path), code=response.status_code, message=response.content)
webdav3.exceptions.ResponseErrorCode: Request to https://nc.torproject.net/remote.php/dav/files/dangerzone-bot/CVS/dangerzone-processed/ failed with code 412 and message: b'<?xml version="1.0" encoding="utf-8"?>\n<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">\n <s:exception>Sabre\\DAV\\Exception\\PreconditionFailed</s:exception>\n <s:message>The destination node already exists, and the overwrite header is set to false</s:message>\n <s:header>Overwrite</s:header>\n</d:error>\n'
first off, it shouldn't start processing dangerzone-processed
, it's part of the special folder list. Second, it should at least succeed in moving the files, although I guess it's better that it fails, because otherwise it would have kept creating an infinite recursion of dangerzone-processing/
folders or something...