Skip to content

Commit

Permalink
Process open flag O_TRUNC into our FMODE_TRUNC
Browse files Browse the repository at this point in the history
  • Loading branch information
headius committed Feb 19, 2025
1 parent dc13826 commit 25320ad
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/src/main/java/org/jruby/util/io/ModeFlags.java
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,9 @@ public static int getOpenFileFlagsFor(int flags) {
if ((flags & APPEND) != 0) {
fmodeFlags |= OpenFile.APPEND;
}
if ((flags & TRUNC) != 0) {
fmodeFlags |= OpenFile.TRUNC;
}
if ((flags & CREAT) != 0) {
fmodeFlags |= OpenFile.CREATE;
}
Expand Down

0 comments on commit 25320ad

Please sign in to comment.