Fix s3 recovery from tombstone in UploadRecovery.

This commit is contained in:
Guo Xiang Tan 2018-09-13 09:19:45 +08:00
parent 9461c99210
commit 4dc25ad201

View File

@ -89,9 +89,12 @@ class UploadRecovery
tombstone_prefix = FileStore::S3Store::TOMBSTONE_PREFIX
if key.starts_with?(tombstone_prefix)
old_key = key
key = key.sub(tombstone_prefix, "")
Discourse.store.s3_helper.copy(
old_key,
key,
key.sub(tombstone_prefix, ""),
options: { acl: "public-read" }
)
end