* 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

@ -604,7 +604,7 @@ fhandler_disk_file::ftruncate (_off64_t length)
else
{
_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))
{