Commit 6798e23a authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Handle files that disapper during transfer

parent b506ddef
...@@ -135,7 +135,12 @@ class Server: ...@@ -135,7 +135,12 @@ class Server:
writer = tar_stream.TarWriter(stdout) writer = tar_stream.TarWriter(stdout)
for path in readlines_nul(stdin): for path in readlines_nul(stdin):
arcname = path.decode('utf8', errors='surrogateescape') arcname = path.decode('utf8', errors='surrogateescape')
writer.add(os.path.join(cwd, arcname), arcname=arcname) try:
full_path = os.path.join(cwd, arcname)
writer.add(full_path, arcname=arcname)
except FileNotFoundError:
self.log.MESSAGE("File disappeared '%s'" % full_path)
writer.close() writer.close()
self.failed = False self.failed = False
finally: finally:
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