mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-12 07:18:23 +01:00
fs: test_links: create destination directory first
`dvc.fs.utils.test_links()` fails with a CacheLinkError if the target `to_path` does not already exist, as is the case when "abc.dvc" exists (referring to a directory object) and we try to run "dvc pull abc/def". To avoid this issue, fully create `to_path` before attempting to create a link in it.
This commit is contained in:
committed by
Ruslan Kuprieiev
parent
634246f81c
commit
92f714e5ca
@@ -153,6 +153,7 @@ def test_links(
|
||||
from_fs.makedirs(from_fs.path.parent(from_file))
|
||||
with from_fs.open(from_file, "wb") as fobj:
|
||||
fobj.write(b"test")
|
||||
to_fs.makedirs(to_fs.path.parent(to_file))
|
||||
|
||||
ret = []
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user