Skip to content

get/import: check target path before downloading #3673

@jorgeorpinel

Description

@jorgeorpinel
λ dvc version
DVC version: 0.93.0
Python version: 3.7.5
Platform: Windows-10-10.0.18362-SP0
Binary: True
Package: exe
Supported remotes: azure, gdrive, gs, hdfs, http, https, s3, ssh, oss
Cache: reflink - not supported, hardlink - supported, symlink - not supported
Filesystem type (cache directory): ('NTFS', 'C:\\')
Repo: dvc, git
Filesystem type (workspace): ('NTFS', 'C:\\')

λ echo data > data.xml
λ la
...
-rw-r--r-- 1 usd grp        5 Apr 23 21:31 data.xml
λ dvc get https://github.com/iterative/dataset-registry get-started/data.xml -o data.xml
# HERE I SEE THE DOWNLOAD BAR FIRST, and the whole transfer is done up to 100%
ERROR: unexpected error - [WinError 5] Access is denied: 'C:\\Users\\poj12\\DVC-repos\\dvc-get-started\\data.xml.Cf4LfW3t5gZ7aK9F2qXquP'
λ la
...
-r--r--r-- 1 usd grp 37916850 Apr 23 21:26 data.xml
-rw-r--r-- 1 usd grp 37916850 Apr 23 21:26 data.xml.Cf4LfW3t5gZ7aK9F2qXquP

The result is I end up with the download having overwritten the small data.xml I created, but with an error message, and with the tmp file not deleted either, as it can be seen above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugDid we break something?p1-importantImportant, aka current backlog of things to doresearch

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions