Skip to content

RepoTree: preserve relative paths in copytree()#4133

Merged
pmrowla merged 1 commit into
treeverse:masterfrom
pmrowla:4131-get-directory
Jun 30, 2020
Merged

RepoTree: preserve relative paths in copytree()#4133
pmrowla merged 1 commit into
treeverse:masterfrom
pmrowla:4131-get-directory

Conversation

@pmrowla
Copy link
Copy Markdown
Contributor

@pmrowla pmrowla commented Jun 30, 2020

Partial fix for #4131 (resolves the dvc get bug only).

  • ❗ I have followed the Contributing to DVC checklist.

  • 📖 If this PR requires documentation updates, I have created a separate PR (or issue, at least) in dvc.org and linked it here.

  • ❌ I will check DeepSource, CodeClimate, and other sanity checks below. (We consider them recommendatory and don't expect everything to be addressed. Please fix things that actually improve code or fix bugs.)

Thank you for the contribution - we'll try to review it as soon as possible. 🙏

@pmrowla pmrowla self-assigned this Jun 30, 2020
Comment thread dvc/repo/tree.py
for fname in files:
src = root / fname
with self.open(src, mode="rb") as fobj:
copy_fobj_to_file(fobj, dest / fname)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dest here was the top level destination path, rather than the expected relative path

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I should not have removed that without thinking once. My bad.

@pmrowla pmrowla requested review from efiop, pared and skshetry June 30, 2020 05:28
@pmrowla pmrowla merged commit c6a024f into treeverse:master Jun 30, 2020
@pmrowla pmrowla deleted the 4131-get-directory branch June 30, 2020 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants