Skip to content
Snippets Groups Projects
Commit 7df495fb authored by James Lopez's avatar James Lopez
Browse files

updated uploads saver

parent 816dfcb1
No related branches found
No related tags found
1 merge request!3114Export project functionality
Pipeline #
Loading
Loading
@@ -14,15 +14,20 @@ module Gitlab
def save
return true unless File.directory?(uploads_path)
 
FileUtils.copy_entry(uploads_path, uploads_export_path)
true
copy_files(uploads_path, uploads_export_path)
rescue => e
@shared.error(e.message)
@shared.error(e)
false
end
 
private
 
def copy_files(source, destination)
FileUtils.mkdir_p(destination)
FileUtils.copy_entry(source, destination)
true
end
def uploads_export_path
File.join(@shared.export_path, 'uploads')
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