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
SaveFile method creates unreadable file #1
Comments
Thank you very much Brian! It is fixed. Apparently, this flag doesn't do much on Windows? (I tested only on Windows so far) Can you please tell me the OS you used. Linux? |
Actually I am using macOS High Sierra. I suspect the same behavior would have occurred on Linux, though. |
I suppose so too. I'll test it on Linux, try to reproduce that behaviour and close the issue later. But it's already fixed in code. Thanks again. |
I tested the file attributes on Debian GNU/Linux 9 (stretch) and the issue you reported occurs there too when 'perm' is set to 0 (except on an NTFS mounted volume). Thank you. |
Merge pull request #6 from BrianHoldsworth/master
In SaveFile, ioutil.WriteFile is used to save the file without any file attributes. Therefore, the file cannot be read until one performs a
chmod
to set reasonable attributes.var err = ioutil.WriteFile(filename, pdf.Bytes(), 0)
should be
var err = ioutil.WriteFile(filename, pdf.Bytes(), 0644)
The text was updated successfully, but these errors were encountered: