From 5db369d67e6c7d43debb793b53f2da364d187bf9 Mon Sep 17 00:00:00 2001 From: Takeshi Nakatani Date: Tue, 11 Oct 2016 10:17:46 +0000 Subject: [PATCH] Trim symbolic link original path in file. --- src/s3fs.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/s3fs.cpp b/src/s3fs.cpp index 6e33caa..6eab4c8 100644 --- a/src/s3fs.cpp +++ b/src/s3fs.cpp @@ -868,7 +868,7 @@ static int s3fs_readlink(const char* path, char* buf, size_t size) // check buf if it has space words. string strTmp = trim(string(buf)); - ressize = strTmp.length(); + ressize = static_cast(strTmp.length()); strcpy(buf, strTmp.c_str()); FdManager::get()->Close(ent); @@ -1179,7 +1179,7 @@ static int s3fs_symlink(const char* from, const char* to) } // write(without space words) string strFrom = trim(string(from)); - ssize_t from_size = strFrom.size(); + ssize_t from_size = static_cast(strFrom.length()); if(from_size != ent->Write(strFrom.c_str(), 0, from_size)){ S3FS_PRN_ERR("could not write tmpfile(errno=%d)", errno); FdManager::get()->Close(ent);