Skip to content
Snippets Groups Projects
Commit 6e36452e authored by Michael Kozono's avatar Michael Kozono
Browse files

Refactor

parent 473ddfb4
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -98,12 +98,6 @@ module Gitlab
Digest::SHA256.file(absolute_path).hexdigest
end
 
# Not including a leading slash
def path_relative_to_upload_dir
base = %r{\A#{Regexp.escape(Gitlab::BackgroundMigration::PrepareUntrackedUploads::RELATIVE_UPLOAD_DIR)}/}
@path_relative_to_upload_dir ||= path.sub(base, '')
end
private
 
def matching_pattern_map
Loading
Loading
@@ -127,6 +121,12 @@ module Gitlab
project.id
end
 
# Not including a leading slash
def path_relative_to_upload_dir
base = %r{\A#{Regexp.escape(Gitlab::BackgroundMigration::PrepareUntrackedUploads::RELATIVE_UPLOAD_DIR)}/}
@path_relative_to_upload_dir ||= path.sub(base, '')
end
def absolute_path
File.join(CarrierWave.root, path)
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment