Also truncate opened files in `File::truncate()` (see #5459)