From c08272ac2469e6982f81d4e61cecae46f89fed7b Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Mon, 1 Oct 2018 15:32:52 +0200 Subject: Ensure correct permission when `tmpdir` is the same as `dirname`. --- activesupport/lib/active_support/core_ext/file/atomic.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport/lib/active_support/core_ext') diff --git a/activesupport/lib/active_support/core_ext/file/atomic.rb b/activesupport/lib/active_support/core_ext/file/atomic.rb index 8e288833b6..9deceb1bb4 100644 --- a/activesupport/lib/active_support/core_ext/file/atomic.rb +++ b/activesupport/lib/active_support/core_ext/file/atomic.rb @@ -29,7 +29,7 @@ class File old_stat = if exist?(file_name) # Get original file permissions stat(file_name) - elsif temp_dir != dirname(file_name) + else # If not possible, probe which are the default permissions in the # destination directory. probe_stat_in(dirname(file_name)) -- cgit v1.2.3