Fixed a bug(Issue 371)

1) Fixed Issue 371
   Fixes a bug which is wrong return value in s3fs_truncate function(mis-coding).
 
   Issue 371: ftruncate failed



git-svn-id: http://s3fs.googlecode.com/svn/trunk@486 df820570-a93a-0410-bd06-b72b767a4274
This commit is contained in:
ggtakec@gmail.com 2013-09-19 09:22:02 +00:00
parent 41bf0e3558
commit 3ba40a30cd

View File

@ -1814,10 +1814,10 @@ static int s3fs_truncate(const char* path, off_t size)
DPRN("could not open file(%s): errno=%d", path, errno);
return -EIO;
}
if(!ent->Load(0, size)){
DPRN("could not download file(%s): errno=%d", path, errno);
if(0 != (result = ent->Load(0, size))){
DPRN("could not download file(%s): result=%d", path, result);
FdManager::get()->Close(ent);
return -EIO;
return result;
}
}else{