* fhandler_disk_file.cc (fhandler_disk_file::ftruncate): Fix checking

lseek return code.
This commit is contained in:
Corinna Vinschen 2005-02-09 19:28:06 +00:00
parent b51b23bf82
commit 9631b700f9
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2005-02-09 Corinna Vinschen <corinna@vinschen.de>
* fhandler_disk_file.cc (fhandler_disk_file::ftruncate): Fix checking
lseek return code.
2005-02-08 Corinna Vinschen <corinna@vinschen.de> 2005-02-08 Corinna Vinschen <corinna@vinschen.de>
* times.cc (timeval_to_filetime): Define first parameter const. * times.cc (timeval_to_filetime): Define first parameter const.

View File

@ -604,7 +604,7 @@ fhandler_disk_file::ftruncate (_off64_t length)
else else
{ {
_off64_t prev_loc = lseek (0, SEEK_CUR); _off64_t prev_loc = lseek (0, SEEK_CUR);
if (lseek (length, SEEK_SET) > 0) if (lseek (length, SEEK_SET) >= 0)
{ {
if (get_fs_flags (FILE_SUPPORTS_SPARSE_FILES)) if (get_fs_flags (FILE_SUPPORTS_SPARSE_FILES))
{ {