Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
dnl Process this file with autoconf to produce a configure script.

AC_PREREQ(2.59)
AC_INIT(cosfs, 1.0.17)
AC_INIT(cosfs, 1.0.18)
AC_CONFIG_HEADER([config.h])

AC_CANONICAL_SYSTEM
Expand Down
8 changes: 4 additions & 4 deletions src/s3fs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1191,7 +1191,7 @@ static int rename_object(const char* from, const char* to)
}
s3_realpath = get_realpath(from);

meta["x-cos-copy-source"] = urlEncode(service_path + bucket + "-" + appid + s3_realpath);
meta["x-cos-copy-source"] = urlEncode(service_path + bucket + "-" + appid + get_realpath(s3_realpath.c_str()));
meta["Content-Type"] = S3fsCurl::LookupMimeType(string(to));
meta["x-cos-metadata-directive"] = "REPLACE";

Expand Down Expand Up @@ -1538,7 +1538,7 @@ static int s3fs_chmod(const char* path, mode_t mode)
}else{
// normal object or directory object of newer version
meta["x-cos-meta-mode"] = str(mode);
meta["x-cos-copy-source"] = urlEncode(service_path + bucket + get_realpath(strpath.c_str()));
meta["x-cos-copy-source"] = urlEncode(service_path + bucket + "-" + appid + get_realpath(strpath.c_str()));
meta["x-cos-metadata-directive"] = "REPLACE";

if(put_headers(strpath.c_str(), meta, true) != 0){
Expand Down Expand Up @@ -1709,7 +1709,7 @@ static int s3fs_chown(const char* path, uid_t uid, gid_t gid)
}else{
meta["x-cos-meta-uid"] = str(uid);
meta["x-cos-meta-gid"] = str(gid);
meta["x-cos-copy-source"] = urlEncode(service_path + bucket + get_realpath(strpath.c_str()));
meta["x-cos-copy-source"] = urlEncode(service_path + bucket + "-" + appid + get_realpath(strpath.c_str()));
meta["x-cos-metadata-directive"] = "REPLACE";

if(put_headers(strpath.c_str(), meta, true) != 0){
Expand Down Expand Up @@ -1874,7 +1874,7 @@ static int s3fs_utimens(const char* path, const struct timespec ts[2])
}
}else{
meta["x-cos-meta-mtime"] = str(ts[1].tv_sec);
meta["x-cos-copy-source"] = urlEncode(service_path + bucket + get_realpath(strpath.c_str()));
meta["x-cos-copy-source"] = urlEncode(service_path + bucket + "-" + appid + get_realpath(strpath.c_str()));
meta["x-cos-metadata-directive"] = "REPLACE";

if(put_headers(strpath.c_str(), meta, true) != 0){
Expand Down