-
-
Notifications
You must be signed in to change notification settings - Fork 925
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
chmod inside of File block fails to create file #1149
Comments
I remember seeing something reported (and being able to reproduce, I think) where File.new { } was not creating the file on disk. I was unable to figure out why it would happen. It seems to be specific to a certain combination of file flags, but I have not managed to narrow it down. |
Tried adding f.flush before the chmod and it doesn't seem to make any difference. |
I've investigated why it doesn't create the file but not gotten anywhere. There are a couple cases online where FileOutputStream does not create the specified file automatically, so maybe we're not the only ones seeing this. Unsure how to proceed, since I went down to the native code and the JVM even passes O_CREAT to open/64. |
The workaround isn't bad:
So I'm not too worried about it. |
@enebo no, this was definitely on MacOS, so maybe it went away. |
Well optimistically calling this resolved then! |
While looking at a CI failure on the rubyzip gem, I found that an error
was generated from a line like this:
The error was:
I haven't been able to isolate the issue, but it can easily be reproduced from the rubyzip test suite like so:
The test suite fails to create it's fixtures because of this line (which is the same as the one shown at the top of the issue):
https://github.com/rubyzip/rubyzip/blob/cb6e628fb27b3785527945068e01fcc3fa8d8654/test/gentestfiles.rb#L96
The text was updated successfully, but these errors were encountered: