From 3ba40a30cdfb95428e324fc4665bbdc3d020a826 Mon Sep 17 00:00:00 2001 From: "ggtakec@gmail.com" Date: Thu, 19 Sep 2013 09:22:02 +0000 Subject: [PATCH] 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 --- src/s3fs.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/s3fs.cpp b/src/s3fs.cpp index 70ca64b..f62438f 100644 --- a/src/s3fs.cpp +++ b/src/s3fs.cpp @@ -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{