Verified Commit c0523a7e authored by anarcat's avatar anarcat
Browse files

explicitly upload only the processed path

The `upload_sync()` function actually wipes the remote directory (or,
more precisely, removes files not present locally), so we actually
need to specify which component we need to upload, otherwise other
sanitized folders will get destroyed.

Closes: #7
parent 11b480c1
......@@ -431,15 +431,16 @@ class ProcessingClient(wc.Client):
# 6. on success, upload the sanitized file to a safe/
# folder, move the original to dangerzone/processed
remote_safe_path = folder + "/safe/"
remote_safe_path = folder + "/safe/" + path
local_safe_path = self.sanitizer.safe_dir + "/" + path
logging.info(
"uploading %s to %s", self.sanitizer.safe_dir, remote_safe_path
"uploading %s to %s", local_safe_path, remote_safe_path
)
if not self.dryrun:
self.upload_sync(
# does that work when safe/ already has stuff?
remote_path=remote_safe_path,
local_path=self.sanitizer.safe_dir,
local_path=local_safe_path,
)
remote_processed_path = folder + "/dangerzone/processed/" + path
logging.info(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment