Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

weird behaviour when adding nested dirs #2348

Closed
daviddias opened this issue Feb 16, 2016 · 2 comments
Closed

weird behaviour when adding nested dirs #2348

daviddias opened this issue Feb 16, 2016 · 2 comments
Labels
kind/bug A bug in existing code (including security flaws)
Milestone

Comments

@daviddias
Copy link
Member

I noticed a weird behaviour when adding nested dirs with go-ipfs, it seems that ipfs add -r freaks out if a dir is empty and exits prematurely

» ipfs version
ipfs version 0.4.0-dev
» ipfs add -r dir-big
added QmW7BDxEbGqxxSYVtn3peNPQgdDXbWkoQ6J1EFYAEuQV3Q dir-big/1.2MiB.txt
added QmaFgyFJUP4fxFySJCddg2Pj6rpwSywopWk87VEVv52RSj dir-big
» tree dir-big
dir-big
└── 1.2MiB.txt

0 directories, 1 file
» ipfs add -r dir-nested
added QmQmZQxSKQppbsWfVzBvg59Cn3DKtsNVQ94bjAxg2h3Lb8 dir-nested/200Bytes.txt
added QmQmZQxSKQppbsWfVzBvg59Cn3DKtsNVQ94bjAxg2h3Lb8 dir-nested/level-1/200Bytes.txt
» tree dir-nested
dir-nested
├── 200Bytes.txt
├── dir-another
└── level-1
    ├── 200Bytes.txt
    └── level-2

3 directories, 2 files
@daviddias daviddias added the kind/bug A bug in existing code (including security flaws) label Feb 16, 2016
@daviddias daviddias added this to the IPFS 0.4.0 milestone Feb 16, 2016
@whyrusleeping
Copy link
Member

@diasdavid can you write a small test script to reproduce? i.e. mkdir -p a/b/c && ipfs add -r a

@daviddias
Copy link
Member Author

While I was preparing the script for you, I saw it failing again several times, but now, after I tar'ed it and added to IPFS, and finished the script that would download from ipfs, untar and ipfs add -r, it started working!! Then I went back to the original dir-nested where I was seeing the error and it doesn't happen anymore and I seem unable to make it fail again 😧

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws)
Projects
None yet
Development

No branches or pull requests

2 participants