summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2016-04-28 18:00:30 +0200
committerJames Lopez <james@jameslopez.es>2016-04-28 18:00:30 +0200
commitc5bc262981a9fbfe748dfb0b527e4fb0fa597ccf (patch)
treee48c1e73a058b3ca70fd018710d8fc1ae426e0ba /app/controllers
parent5908bdf3edb6f59674789e3d210999406d455f67 (diff)
downloadgitlab-ce-c5bc262981a9fbfe748dfb0b527e4fb0fa597ccf.tar.gz
few fixes - import from UI working
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/projects_controller.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 1d4684ca22e..62f8b376c18 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -191,6 +191,7 @@ class ProjectsController < Projects::ApplicationController
end
def export
+ #TODO: Move to worker
::Projects::ImportExport::ExportService.new(@project, current_user).execute
redirect_to(
@@ -267,6 +268,7 @@ class ProjectsController < Projects::ApplicationController
def export_project_path
# TODO: move this, probably to ImportExport and refactor
- File.join(Settings.shared['path'], 'tmp/project_exports', @project.path_with_namespace, 'project.tar.gz')
+ folder = File.join(Settings.shared['path'], 'tmp/project_exports', @project.path_with_namespace)
+ Dir.glob("#{folder}/*export.tar.gz").max_by {|f| File.ctime(f)}
end
end