Commit dc18038a authored by Stan Hu's avatar Stan Hu Committed by Winnie Hellmann
Browse files

Merge branch '4056-hashed-storage-upload-transfers' into 'master'

Fix project transfer with hashed-storage attachments

Closes gitlab-ee#4056

See merge request gitlab-org/gitlab-ce!15457

(cherry picked from commit 121508f81fec8773af37a345abb6c33b7a3c4518)

9b3b0f02 Fix project transfer with hashed-storage attachments
parent 40ff35fc2e61
......@@ -67,7 +67,7 @@ def attempt_transfer_transaction
Labels::TransferService.new(current_user, @old_group, project).execute
# Move uploads
Gitlab::UploadsTransfer.new.move_project(project.path, @old_namespace.full_path, @new_namespace.full_path)
move_project_uploads(project)
# Move pages
Gitlab::PagesTransfer.new.move_project(project.path, @old_namespace.full_path, @new_namespace.full_path)
......@@ -139,5 +139,15 @@ def move_project_folders(project)
# Move wiki repo also if present
move_repo_folder("#{@old_path}.wiki", "#{@new_path}.wiki")
end
def move_project_uploads(project)
return if project.hashed_storage?(:attachments)
Gitlab::UploadsTransfer.new.move_project(
project.path,
@old_namespace.full_path,
@new_namespace.full_path
)
end
end
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment