diff options
Diffstat (limited to 'lib/gitlab/import_export/lfs_saver.rb')
-rw-r--r-- | lib/gitlab/import_export/lfs_saver.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/gitlab/import_export/lfs_saver.rb b/lib/gitlab/import_export/lfs_saver.rb index 22a7a8dd7cd..6ad368a5d2f 100644 --- a/lib/gitlab/import_export/lfs_saver.rb +++ b/lib/gitlab/import_export/lfs_saver.rb @@ -56,7 +56,11 @@ module Gitlab end def copy_file_for_lfs_object(lfs_object) - copy_files(lfs_object.file.path, destination_path_for_object(lfs_object)) + file_path = lfs_object.file.path + + return unless File.exist?(file_path) + + copy_files(file_path, destination_path_for_object(lfs_object)) end def append_lfs_json_for_batch(lfs_objects_batch) |