Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

Fix directory mv and add tests #76

Merged
merged 1 commit into from
May 9, 2019
Merged

Conversation

eingenito
Copy link
Contributor

@eingenito eingenito commented May 8, 2019

  • Naming changes for my personal comprehension
  • Add a few tests covering simple mv cases (including our bug)
  • Fix bug in Mv that would leave fail to delete src directories (when named without a trailing slash) after copying them to their new location

This change fixes the go-ipfs tests: https://circleci.com/gh/ipfs/go-ipfs/tree/fix%2Fmfs-regression

* Naming changes for my personal comprehension
* Add a few tests covering simple mv cases (including our bug)
* Fix bug in Mv that would leave fail to delete src directories (when named without a trailing slash) after copying them to their new location
@eingenito eingenito requested a review from schomatis as a code owner May 8, 2019 19:15
@ghost ghost assigned eingenito May 8, 2019
@ghost ghost added the status/in-progress In progress label May 8, 2019
if err != nil {
return err
}

if srcDir == dstDirStr && srcFname == filename {
if srcDir.name == dstDir.name && srcFname == dstFname {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the only substantive change in this file and is the actual source of the bug revealed in go-ipfs sharness tests. Everything else is naming changes (which I can totally revert if it's too noisy).

Copy link
Member

@Stebalien Stebalien left a comment

Choose a reason for hiding this comment

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

Thanks! (and that's much easier to read)

@Stebalien Stebalien merged commit 94b38c2 into master May 9, 2019
@Stebalien Stebalien deleted the fix/73-mv-fails-to-clean-up branch May 9, 2019 09:27
@ghost ghost removed the status/in-progress In progress label May 9, 2019
Jorropo pushed a commit to ipfs/go-libipfs-rapide that referenced this pull request Mar 23, 2023
Fix directory mv and add tests

This commit was moved from ipfs/go-mfs@94b38c2
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants