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

fix minor mfs truncate bug #2382

Merged
merged 1 commit into from
Feb 23, 2016
Merged

fix minor mfs truncate bug #2382

merged 1 commit into from
Feb 23, 2016

Conversation

whyrusleeping
Copy link
Member

Thanks to @RichardLitt for saying "truncate doesnt work" and making go try to prove him wrong and find a bug in the process.

License: MIT
Signed-off-by: Jeromy jeromyj@gmail.com

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
@whyrusleeping
Copy link
Member Author

@noffle CR please!

@RichardLitt
Copy link
Member

:)

whyrusleeping added a commit that referenced this pull request Feb 23, 2016
@whyrusleeping whyrusleeping merged commit f630f9d into master Feb 23, 2016
@whyrusleeping whyrusleeping deleted the fix/mfs-truncate branch February 23, 2016 18:42
@hackergrrl
Copy link
Contributor

Some clarifying questions for context:

  1. What was Richard's usage of truncate that caused the breakage?
  2. What was the breakage?
  3. What was the expected behaviour?

@RichardLitt
Copy link
Member

  1. I was trying to use curl to access the IPFS API, and truncate wasn't showing the responses I would have liked. https://github.com/ipfs/http-api-spec/blob/feature/files/apiary.apib#L3796
  2. Lack of response from using truncate. See ipfs files write offset command appears faulty #2380
  3. I didn't know, see ipfs files write offset command appears faulty #2380

@@ -358,6 +358,25 @@ test_files_api() {
verify_dir_contents /
'

# test truncating
test_expect_success "create a new file" '
echo "some content" | ipfs files write --create /cats
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps also verify its contents are as expected before doing the truncate below?

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