diff options
author | Caolán McNamara <cmc@openoffice.org> | 2010-05-24 11:28:33 +0100 |
---|---|---|
committer | Caolán McNamara <cmc@openoffice.org> | 2010-05-24 11:28:33 +0100 |
commit | 5186da3ad7783a49efb08064f9cf380754c3f4bd (patch) | |
tree | 530e70181a70821bca2e6d14fb97629e46f5fe03 /shell/source/unix | |
parent | 38e2055d0d65c9464a74c3e688290fac0829a2d8 (diff) |
cmcfixes75: #i111796# check ftruncate return value
Diffstat (limited to 'shell/source/unix')
-rw-r--r-- | shell/source/unix/sysshell/recently_used_file.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/shell/source/unix/sysshell/recently_used_file.cxx b/shell/source/unix/sysshell/recently_used_file.cxx index cc4fbf75adcc..8a9de90c8b16 100644 --- a/shell/source/unix/sysshell/recently_used_file.cxx +++ b/shell/source/unix/sysshell/recently_used_file.cxx @@ -114,7 +114,8 @@ void recently_used_file::reset() const //------------------------------------------------ void recently_used_file::truncate(off_t length) { - ftruncate(fileno(file_), length); + if (ftruncate(fileno(file_), length) == -1) + throw "I/O error: ftruncate failed"; } //------------------------------------------------ |