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

Uploads are corrupt #11

Closed
rrthomas opened this issue Oct 3, 2012 · 7 comments
Closed

Uploads are corrupt #11

rrthomas opened this issue Oct 3, 2012 · 7 comments

Comments

@rrthomas
Copy link

rrthomas commented Oct 3, 2012

Whenever I upload a file using ghup, the resulting download is shorter than the file I uploaded.

@wereHamster
Copy link
Owner

Does this always happen, with all files? Or just certain files? What is your OS/ruby version?

@rrthomas
Copy link
Author

rrthomas commented Oct 4, 2012

As far as I can tell it happens with all files. I'm using Ubuntu 12.04 with ruby 1.9.3.0.

@wereHamster
Copy link
Owner

I've just merged (a rather old) pull request which slightly changes the way how files are uploaded. Maybe it fixes your problem. Can you try with the latest version?

@rrthomas
Copy link
Author

rrthomas commented Oct 4, 2012

This doesn't help (just tried), but it's not a surprise, as the file utility does exist on my platform, and files are always read as binary (the fixes are for non-UNIX platforms).

@rrthomas
Copy link
Author

rrthomas commented Oct 4, 2012

Scratch that: the update appears to make it work. Search me how it works, for the above reasons, but it seems to. (The first time I tried and failed I was running with the wrong version of github-upload.)

@wereHamster
Copy link
Owner

Could it be that files are not always read as binary, and that there is indeed a difference between #read and #binread even on unix?

@rrthomas
Copy link
Author

rrthomas commented Oct 4, 2012

If some kind of text encoding comes into play; I'm no Ruby expert.

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

No branches or pull requests

2 participants