Skip to content

Commit 2ffc672

Browse files
authored
Fix: don't flush twice in File#truncate (UNIX) (#16395)
1 parent 1522683 commit 2ffc672

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/crystal/system/unix/file.cr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,6 @@ module Crystal::System::File
217217
end
218218

219219
private def system_truncate(size) : Nil
220-
flush
221220
code = LibC.ftruncate(fd, size)
222221
if code != 0
223222
raise ::File::Error.from_errno("Error truncating file", file: path)

0 commit comments

Comments
 (0)