@@ -1191,7 +1191,7 @@ static int rename_object(const char* from, const char* to)
11911191 }
11921192 s3_realpath = get_realpath (from);
11931193
1194- meta[" x-cos-copy-source" ] = urlEncode (service_path + bucket + " -" + appid + s3_realpath);
1194+ meta[" x-cos-copy-source" ] = urlEncode (service_path + bucket + " -" + appid + get_realpath ( s3_realpath. c_str ()) );
11951195 meta[" Content-Type" ] = S3fsCurl::LookupMimeType (string (to));
11961196 meta[" x-cos-metadata-directive" ] = " REPLACE" ;
11971197
@@ -1538,7 +1538,7 @@ static int s3fs_chmod(const char* path, mode_t mode)
15381538 }else {
15391539 // normal object or directory object of newer version
15401540 meta[" x-cos-meta-mode" ] = str (mode);
1541- meta[" x-cos-copy-source" ] = urlEncode (service_path + bucket + get_realpath (strpath.c_str ()));
1541+ meta[" x-cos-copy-source" ] = urlEncode (service_path + bucket + " - " + appid + get_realpath (strpath.c_str ()));
15421542 meta[" x-cos-metadata-directive" ] = " REPLACE" ;
15431543
15441544 if (put_headers (strpath.c_str (), meta, true ) != 0 ){
@@ -1709,7 +1709,7 @@ static int s3fs_chown(const char* path, uid_t uid, gid_t gid)
17091709 }else {
17101710 meta[" x-cos-meta-uid" ] = str (uid);
17111711 meta[" x-cos-meta-gid" ] = str (gid);
1712- meta[" x-cos-copy-source" ] = urlEncode (service_path + bucket + get_realpath (strpath.c_str ()));
1712+ meta[" x-cos-copy-source" ] = urlEncode (service_path + bucket + " - " + appid + get_realpath (strpath.c_str ()));
17131713 meta[" x-cos-metadata-directive" ] = " REPLACE" ;
17141714
17151715 if (put_headers (strpath.c_str (), meta, true ) != 0 ){
@@ -1874,7 +1874,7 @@ static int s3fs_utimens(const char* path, const struct timespec ts[2])
18741874 }
18751875 }else {
18761876 meta[" x-cos-meta-mtime" ] = str (ts[1 ].tv_sec );
1877- meta[" x-cos-copy-source" ] = urlEncode (service_path + bucket + get_realpath (strpath.c_str ()));
1877+ meta[" x-cos-copy-source" ] = urlEncode (service_path + bucket + " - " + appid + get_realpath (strpath.c_str ()));
18781878 meta[" x-cos-metadata-directive" ] = " REPLACE" ;
18791879
18801880 if (put_headers (strpath.c_str (), meta, true ) != 0 ){
0 commit comments