mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-26 15:28:28 +01:00
link: don't create links for empty files
Related to #1222 Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
@@ -127,6 +127,14 @@ class RemoteLOCAL(RemoteBase):
|
||||
if not os.path.exists(dname):
|
||||
os.makedirs(dname)
|
||||
|
||||
# NOTE: just create an empty file for an empty cache
|
||||
if os.path.getsize(cache) == 0:
|
||||
open(path, 'w+').close()
|
||||
msg = "Created empty file: {} -> {}"
|
||||
self.project.logger.info(msg.format(os.path.relpath(cache),
|
||||
os.path.relpath(path)))
|
||||
return
|
||||
|
||||
i = len(self.cache_types)
|
||||
while i > 0:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user