Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
e2b7880b
Commit
e2b7880b
authored
Jul 11, 2018
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix spec
parent
fa2e3162
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
8 deletions
+16
-8
lib/gitlab/import_export/uploads_manager.rb
lib/gitlab/import_export/uploads_manager.rb
+14
-8
lib/gitlab/import_export/uploads_restorer.rb
lib/gitlab/import_export/uploads_restorer.rb
+2
-0
No files found.
lib/gitlab/import_export/uploads_manager.rb
View file @
e2b7880b
...
...
@@ -29,6 +29,18 @@ module Gitlab
Dir
[
"
#{
uploads_export_path
}
/**/*"
].
each
do
|
upload
|
next
if
File
.
directory?
(
upload
)
add_upload
(
upload
)
end
true
rescue
=>
e
@shared
.
error
(
e
)
false
end
private
def
add_upload
(
upload
)
secret
,
identifier
=
upload
.
split
(
'/'
).
last
(
2
)
uploader_context
=
{
...
...
@@ -38,12 +50,6 @@ module Gitlab
UploadService
.
new
(
@project
,
File
.
open
(
upload
,
'r'
),
FileUploader
,
uploader_context
).
execute
end
rescue
=>
e
@shared
.
error
(
e
)
false
end
private
def
copy_from_object_storage
return
unless
Gitlab
::
ImportExport
.
object_storage?
...
...
lib/gitlab/import_export/uploads_restorer.rb
View file @
e2b7880b
...
...
@@ -9,6 +9,8 @@ module Gitlab
).
restore
elsif
File
.
directory?
(
uploads_export_path
)
copy_files
(
uploads_export_path
,
uploads_path
)
true
else
true
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment