Commit 2fa1203a authored by Wei-Yin Chen (陳威尹)'s avatar Wei-Yin Chen (陳威尹) Committed by Commit Bot

Fix regression of gclient-new-workdir.py

gclient-new-workdir.py should work on systems not supporting reflink now.

Bug: 728903, 721585
Change-Id: I1385c4281bbf61d4ccae64c3595a39972fbe9d9e
Reviewed-on: https://chromium-review.googlesource.com/522232
Commit-Queue: Wei-Yin Chen (陳威尹) <wychen@chromium.org>
Reviewed-by: 's avatarRobbie Iannucci <iannucci@chromium.org>
parent 6d0d0445
......@@ -56,7 +56,8 @@ def support_cow(src, dest):
except subprocess.CalledProcessError:
return False
finally:
os.remove(dest)
if os.path.isfile(dest):
os.remove(dest)
return True
......@@ -64,7 +65,7 @@ def try_vol_snapshot(src, dest):
try:
subprocess.check_call(['btrfs', 'subvol', 'snapshot', src, dest],
stderr=subprocess.STDOUT)
except subprocess.CalledProcessError:
except (subprocess.CalledProcessError, OSError):
return False
return True
......
Markdown is supported
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