cache: move unrelated helpers out of CloudCache class (#5439)

* cache: move transfer to objects

Moving it as is for now.

* cache: move link() to checkout
This commit is contained in:
Ruslan Kuprieiev
2021-02-10 07:49:27 +02:00
committed by GitHub
parent 384a4113ca
commit fa550f91c3
11 changed files with 203 additions and 191 deletions
-3
View File
@@ -195,9 +195,6 @@ def copyfile(src, dest, no_progress_bar=False, name=None):
try:
System.reflink(src, dest)
# NOTE: reflink has a new inode, but has the same mode as the src,
# so we need to chmod it to look like a normal copy.
os.chmod(dest, 0o666 & ~umask)
except DvcException:
with open(src, "rb") as fsrc, open(dest, "wb+") as fdest:
with Tqdm.wrapattr(