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

ipfs files (MFS) mixes up files and directories on ipfs files mv #2654

Closed
ntninja opened this issue May 10, 2016 · 2 comments
Closed

ipfs files (MFS) mixes up files and directories on ipfs files mv #2654

ntninja opened this issue May 10, 2016 · 2 comments
Labels
kind/bug A bug in existing code (including security flaws) regression topic/files Topic files

Comments

@ntninja
Copy link

ntninja commented May 10, 2016

Try running this:

ipfs files mkdir /test_dir
echo "content" | ipfs files write -e "/test_file"
ipfs files rm -r "/test_dir"
ipfs files mv "/test_file" "/test_dir"
ipfs files stat "/test_dir"
ipfs files read "/test_dir"

Expected result

QmZh2DtJpG7XxGaLrDCxMFFNz5ASgJnuy3LL4yAaumRND3
Size: 11
CumulativeSize: 69
ChildBlocks: 1
Type: file

content

Actual result

QmZh2DtJpG7XxGaLrDCxMFFNz5ASgJnuy3LL4yAaumRND3
Size: 11
CumulativeSize: 69
ChildBlocks: 1
Type: directory

Error: /test_dir was not a file.

Additional Notes

Doing ipfs cat on the hash produced by ipfs files stat works:

$ ipfs cat /ipfs/QmZh2DtJpG7XxGaLrDCxMFFNz5ASgJnuy3LL4yAaumRND3
content
lt
@whyrusleeping whyrusleeping added kind/bug A bug in existing code (including security flaws) topic/files Topic files labels May 10, 2016
@whyrusleeping
Copy link
Member

Thanks for reporting! I'll get this fixed ASAP

@whyrusleeping
Copy link
Member

this was addressed in my mfs caching fix #2795

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) regression topic/files Topic files
Projects
None yet
Development

No branches or pull requests

3 participants