diff --git a/include/util/lru_cache.h b/include/util/lru_cache.h index 94f4ac0..dfcf1e7 100644 --- a/include/util/lru_cache.h +++ b/include/util/lru_cache.h @@ -33,7 +33,7 @@ class LruCache { m_entry_map[key] = m_entry_list.begin(); } - const ValueType& Get(const KeyType& key) { + const ValueType Get(const KeyType& key) { std::lock_guard lock(m_mutex); auto it = m_entry_map.find(key); if (it == m_entry_map.end()) { diff --git a/src/op/object_op.cpp b/src/op/object_op.cpp index e26aa91..9253216 100644 --- a/src/op/object_op.cpp +++ b/src/op/object_op.cpp @@ -2003,9 +2003,7 @@ CosResult ObjectOp::ResumableGetObject(const GetObjectByFileReq& req, return head_result; } - std::string dir_name = FileUtil::GetDirectory(req.GetLocalFilePath()); - std::string resumable_task_json_file = - dir_name + "/" + req.GetObjectName() + kResumableDownloadTaskFileSuffix; + std::string resumable_task_json_file = req.GetLocalFilePath() + kResumableDownloadTaskFileSuffix; std::map resume_task_check_element = { {kResumableDownloadTaskLastModified, head_resp.GetLastModified()},