Skip to content
Snippets Groups Projects
Commit fc9832b1 authored by Bryan Stearns's avatar Bryan Stearns
Browse files

Avoid "cannot copy directory to itself" restore error

parent 833bc305
Branches
Tags
1 merge request!165Avoid "cannot copy directory ... to itself" error on restore (on Docker?)
Loading
Loading
@@ -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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment