Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Anders Blomdell
hash_backup
Commits
6798e23a
Commit
6798e23a
authored
Jan 21, 2021
by
Anders Blomdell
Browse files
Handle files that disapper during transfer
parent
b506ddef
Changes
1
Hide whitespace changes
Inline
Side-by-side
primary.py
View file @
6798e23a
...
...
@@ -135,7 +135,12 @@ class Server:
writer
=
tar_stream
.
TarWriter
(
stdout
)
for
path
in
readlines_nul
(
stdin
):
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
)
pass
writer
.
close
()
self
.
failed
=
False
finally
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment