diff options
author | Markus Reiter <me@reitermark.us> | 2018-10-01 15:32:52 +0200 |
---|---|---|
committer | Markus Reiter <me@reitermark.us> | 2018-10-02 16:40:39 +0200 |
commit | c08272ac2469e6982f81d4e61cecae46f89fed7b (patch) | |
tree | f1d67d51a7548813953178a47de73bdff2ecf740 /activesupport/lib | |
parent | 96e69b5a33f44e5339345ef3c4871aba51a1e938 (diff) | |
download | rails-c08272ac2469e6982f81d4e61cecae46f89fed7b.tar.gz rails-c08272ac2469e6982f81d4e61cecae46f89fed7b.tar.bz2 rails-c08272ac2469e6982f81d4e61cecae46f89fed7b.zip |
Ensure correct permission when `tmpdir` is the same as `dirname`.
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/core_ext/file/atomic.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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)) |