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 | e185fae01fabe0eadb39ed4eed3894e937e92c66 (patch) | |
tree | 5d7fe9edf2f07a00fc57bceeac9e4229bb11fa87 /shell | |
parent | dec4aed0fc56b80333a0755e8c1cae17f1762fe7 (diff) |
cmcfixes75: #i111796# check ftruncate return value
Diffstat (limited to 'shell')
-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 050ba60caa..63f92afb0e 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"; } //------------------------------------------------ |