Skip to content

Commit

Permalink
data cloud: add explanaiton to pulled checksums save
Browse files Browse the repository at this point in the history
  • Loading branch information
pared committed Jan 22, 2020
1 parent a148d16 commit e36cc8c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dvc/data_cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ def _save_pulled_checksums(self, cache):
for checksum in cache["local"].keys():
cache_file = self.repo.cache.local.checksum_to_path_info(checksum)
if self.repo.cache.local.exists(cache_file):
# We can safely save here, as existing corrupted files will be
# removed upon status, while files corrupted during download
# will not be copied from tmp_file (see download
# implementation in `remote/base`)
self.repo.state.save(cache_file, checksum)

def status(self, cache, jobs=None, remote=None, show_checksums=False):
Expand Down

0 comments on commit e36cc8c

Please sign in to comment.