Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'util/stream/io.cc')
-rw-r--r--util/stream/io.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/util/stream/io.cc b/util/stream/io.cc
index c64004c0b..fa8467abd 100644
--- a/util/stream/io.cc
+++ b/util/stream/io.cc
@@ -70,6 +70,8 @@ void PWriteAndRecycle::Run(const ChainPosition &position) {
offset += link->ValidSize();
link->SetValidSize(block_size);
}
+ // Trim file to size.
+ util::ResizeOrThrow(file_, offset);
}
} // namespace stream