From ad41a27b8c29219350d0d5d39593e14cc8a04b71 Mon Sep 17 00:00:00 2001 From: Anthony Ross Date: Wed, 9 Aug 2017 13:44:36 +0000 Subject: Use copy to preserve file permissions --- activerecord/lib/active_record/tasks/postgresql_database_tasks.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/tasks/postgresql_database_tasks.rb b/activerecord/lib/active_record/tasks/postgresql_database_tasks.rb index a2e74efc2b..9d7249e1f9 100644 --- a/activerecord/lib/active_record/tasks/postgresql_database_tasks.rb +++ b/activerecord/lib/active_record/tasks/postgresql_database_tasks.rb @@ -136,7 +136,7 @@ module ActiveRecord ensure tempfile.close end - FileUtils.mv(tempfile.path, filename) + FileUtils.cp(tempfile.path, filename) end end end -- cgit v1.2.3