mirror of
https://github.com/OpenNebula/one.git
synced 2025-02-02 09:47:00 +03:00
Bug #3063: Remove incomplete files
This commit is contained in:
parent
b45f29eb0e
commit
29dc081c37
@ -201,6 +201,14 @@ $command | tee >( hasher $HASH_TYPE) | decompress "$decompressor" "$TO"
|
||||
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "Error copying: $command" >&2
|
||||
|
||||
# Remove incomplete file
|
||||
if [ -f "$TO" ]; then
|
||||
rm "$TO"
|
||||
elif [ -d "$TO" ]; then
|
||||
rm -r "$TO"
|
||||
fi
|
||||
|
||||
exit -1
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user