mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-09-30 02:09:02 +00:00
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:
parent
41bf0e3558
commit
3ba40a30cd
@ -1814,10 +1814,10 @@ static int s3fs_truncate(const char* path, off_t size)
|
|||||||
DPRN("could not open file(%s): errno=%d", path, errno);
|
DPRN("could not open file(%s): errno=%d", path, errno);
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
if(!ent->Load(0, size)){
|
if(0 != (result = ent->Load(0, size))){
|
||||||
DPRN("could not download file(%s): errno=%d", path, errno);
|
DPRN("could not download file(%s): result=%d", path, result);
|
||||||
FdManager::get()->Close(ent);
|
FdManager::get()->Close(ent);
|
||||||
return -EIO;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
|
Loading…
Reference in New Issue
Block a user