From c1aaeffc2df7a71815f49ae046838a3536dd426c Mon Sep 17 00:00:00 2001 From: Santiago Smith <16252054+sssilvar@users.noreply.github.com> Date: Tue, 8 Oct 2024 14:10:24 +0200 Subject: [PATCH] fix: directory creation on pulling data (#10580) Co-authored-by: Santiago Silva --- .github/workflows/benchmarks.yaml | 10 +++++----- dvc/fs/dvc.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/benchmarks.yaml b/.github/workflows/benchmarks.yaml index ba7fb2601..45fd2868d 100644 --- a/.github/workflows/benchmarks.yaml +++ b/.github/workflows/benchmarks.yaml @@ -18,16 +18,16 @@ jobs: with: python-version: "3.12" - - uses: astral-sh/setup-uv@v3 - with: - enable-cache: true - cache-dependency-glob: pyproject.toml - - uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.base.sha }} fetch-depth: 0 + - uses: astral-sh/setup-uv@v3 + with: + enable-cache: true + cache-dependency-glob: pyproject.toml + - run: uv pip install '.[tests]' --system - name: run benchmarks on base branch run: pytest --benchmark-autosave dvc/testing/benchmarks/ -k 'test_init or test_help' diff --git a/dvc/fs/dvc.py b/dvc/fs/dvc.py index 6d1a77e74..fbf3f99c0 100644 --- a/dvc/fs/dvc.py +++ b/dvc/fs/dvc.py @@ -571,7 +571,7 @@ class _DVCFileSystem(AbstractFileSystem): os.makedirs(lpath, exist_ok=True) for d in _dirs: - os.mkdir(d) + os.makedirs(d, exist_ok=True) def get_file(arg: tuple[FileSystem, tuple[str, str, Optional[dict]]]): fs, (src, dest, info) = arg