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

On Windows, UploadObject throws exception when trying to upload a binary file #145

Open
fwosar opened this issue Jun 21, 2024 · 2 comments

Comments

@fwosar
Copy link

fwosar commented Jun 21, 2024

The fix is to explicitly pass in std::ios::binary when opening the file stream. On Windows using a clang toolchain and libc++, trying to upload a binary file without the flag set will result in a rather cryptic exception:

libc++abi: terminating due to uncaught exception of type std::__1::ios_base::failure: ios_base::clear: unspecified iostream_category error

It may be a good idea to add some binary files to the automated tests instead of only text files as well. ;)

@balamurugana
Copy link
Member

@fwosar Feel free to send a PR

@kobalicek
Copy link
Contributor

If we are going to add binary files to tests I would like to have a generator of these files in our repository. Could be as simple as a python script, but please no binary files from users that can have encoded whatever data (hello xz utils).

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

3 participants