diff options
author | Bryan Stearns <bryanstearns@gmail.com> | 2014-08-03 13:10:19 -0700 |
---|---|---|
committer | Bryan Stearns <bryanstearns@gmail.com> | 2014-08-03 13:42:11 -0700 |
commit | fc9832b1e67f9798a337a8ad3e1284409360e123 (patch) | |
tree | 531627ee2be217f332f881ef73dd5a1f9d39a5e8 /lib | |
parent | 833bc305933bbf7b8b06d5464ae5716ccbe82674 (diff) | |
download | gitlab-ce-fc9832b1e67f9798a337a8ad3e1284409360e123.tar.gz |
Avoid "cannot copy directory to itself" restore error
Diffstat (limited to 'lib')
-rw-r--r-- | lib/backup/uploads.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/backup/uploads.rb b/lib/backup/uploads.rb index e50e1ff4f13..bf43610acf6 100644 --- a/lib/backup/uploads.rb +++ b/lib/backup/uploads.rb @@ -23,7 +23,7 @@ module Backup def backup_existing_uploads_dir timestamped_uploads_path = File.join(app_uploads_dir, '..', "uploads.#{Time.now.to_i}") if File.exists?(app_uploads_dir) - FileUtils.mv(app_uploads_dir, timestamped_uploads_path) + FileUtils.mv(app_uploads_dir, File.expand_path(timestamped_uploads_path)) end end end |