Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Mazetto <brodock@gmail.com>2017-11-21 18:38:32 +0300
committerGabriel Mazetto <brodock@gmail.com>2017-11-23 16:19:36 +0300
commit4b87c1afaa652d72fa6aeeb4fe52fa3883e2f4c8 (patch)
tree31a1eb3ae197d588b16401d6d03147b900530433 /app/services
parent9fd31eb469de5099f7a7b44840d7930bc3c42bbe (diff)
when rollingback repository migration, toggle readonly mode back
Diffstat (limited to 'app/services')
-rw-r--r--app/services/projects/hashed_storage/migrate_attachments_service.rb4
-rw-r--r--app/services/projects/hashed_storage/migrate_repository_service.rb2
2 files changed, 3 insertions, 3 deletions
diff --git a/app/services/projects/hashed_storage/migrate_attachments_service.rb b/app/services/projects/hashed_storage/migrate_attachments_service.rb
index 26026899ebe..b58b6f57ed7 100644
--- a/app/services/projects/hashed_storage/migrate_attachments_service.rb
+++ b/app/services/projects/hashed_storage/migrate_attachments_service.rb
@@ -22,8 +22,8 @@ module Projects
private
def move_folder!(old_path, new_path)
- unless File.exist?(old_path)
- logger.info("Skipped attachments migration from '#{old_path}' to '#{new_path}', source path doesn't exist (PROJECT_ID=#{project.id})")
+ unless File.directory?(old_path)
+ logger.info("Skipped attachments migration from '#{old_path}' to '#{new_path}', source path doesn't exist or is not a directory (PROJECT_ID=#{project.id})")
return
end
diff --git a/app/services/projects/hashed_storage/migrate_repository_service.rb b/app/services/projects/hashed_storage/migrate_repository_service.rb
index c03db5cc1b9..da43877a185 100644
--- a/app/services/projects/hashed_storage/migrate_repository_service.rb
+++ b/app/services/projects/hashed_storage/migrate_repository_service.rb
@@ -29,7 +29,7 @@ module Projects
unless result
rollback_folder_move
- return result
+ project.storage_version = nil
end
project.repository_read_only = false