@@ -1784,7 +1784,6 @@ CosResult ObjectOp::ResumableGetObject(const MultiGetObjectReq& req,
17841784 CosResult head_result;
17851785 // 1. 调用HeadObject获取文件长度
17861786 HeadObjectReq head_req (req.GetBucketName (), req.GetObjectName ());
1787- ;
17881787 HeadObjectResp head_resp;
17891788 head_result = HeadObject (head_req, &head_resp);
17901789 if (!head_result.IsSucc ()) {
@@ -1794,7 +1793,7 @@ CosResult ObjectOp::ResumableGetObject(const MultiGetObjectReq& req,
17941793
17951794 std::string dir_name = FileUtil::GetDirectory (req.GetLocalFilePath ());
17961795 std::string resumable_task_json_file =
1797- dir_name + req.GetObjectName () + kResumableDownloadTaskFileSuffix ;
1796+ dir_name + " / " + req.GetObjectName () + kResumableDownloadTaskFileSuffix ;
17981797
17991798 std::map<std::string, std::string> resume_task_check_element = {
18001799 {kResumableDownloadTaskLastModified , head_resp.GetLastModified ()},
@@ -1865,20 +1864,20 @@ CosResult ObjectOp::ResumableGetObject(const MultiGetObjectReq& req,
18651864#if defined(_WIN32)
18661865 // The _O_BINARY is need by windows otherwise the x0A might change into x0D
18671866 // x0A
1868- int fd = open (local_path.c_str (), _O_BINARY | O_WRONLY | O_CREAT | O_APPEND,
1867+ fd = open (local_path.c_str (), _O_BINARY | O_WRONLY | O_CREAT | O_APPEND,
18691868 _S_IREAD | _S_IWRITE);
18701869#else
1871- int fd = open (local_path.c_str (), O_WRONLY | O_CREAT | O_APPEND,
1870+ fd = open (local_path.c_str (), O_WRONLY | O_CREAT | O_APPEND,
18721871 S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
18731872#endif
18741873 } else {
18751874#if defined(_WIN32)
18761875 // The _O_BINARY is need by windows otherwise the x0A might change into x0D
18771876 // x0A
1878- int fd = open (local_path.c_str (), _O_BINARY | O_WRONLY | O_CREAT | O_TRUNC,
1877+ fd = open (local_path.c_str (), _O_BINARY | O_WRONLY | O_CREAT | O_TRUNC,
18791878 _S_IREAD | _S_IWRITE);
18801879#else
1881- int fd = open (local_path.c_str (), O_WRONLY | O_CREAT | O_TRUNC,
1880+ fd = open (local_path.c_str (), O_WRONLY | O_CREAT | O_TRUNC,
18821881 S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
18831882#endif
18841883 }
0 commit comments