Commit 42567436 authored by James Lopez's avatar James Lopez

refactored path stuff

parent 2d503f64
...@@ -3,7 +3,7 @@ module Gitlab ...@@ -3,7 +3,7 @@ module Gitlab
extend self extend self
def export_path(relative_path:) def export_path(relative_path:)
File.join(storage_path, relative_path, "#{Time.now.strftime('%Y-%m-%d_%H-%M-%3N')}_gitlab_export") File.join(storage_path, relative_path)
end end
def project_atts def project_atts
...@@ -14,8 +14,6 @@ module Gitlab ...@@ -14,8 +14,6 @@ module Gitlab
Gitlab::ImportExport::ImportExportReader.project_tree Gitlab::ImportExport::ImportExportReader.project_tree
end end
private
def storage_path def storage_path
File.join(Settings.shared['path'], 'tmp/project_exports') File.join(Settings.shared['path'], 'tmp/project_exports')
end end
......
...@@ -31,7 +31,7 @@ module Gitlab ...@@ -31,7 +31,7 @@ module Gitlab
end end
def archive_file def archive_file
@archive_file ||= File.join(@storage_path, '..', 'project.tar.gz') @archive_file ||= File.join(@storage_path, '..', "#{Time.now.strftime('%Y-%m-%d_%H-%M-%3N')}_project_export.tar.gz")
end end
end 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