Project

General

Profile

Actions

Bug #9748

closed

FileUtils.cp always preserve the permission of original files

Added by wehu (Wei Hu) about 10 years ago. Updated almost 10 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-linux]
[ruby-core:62049]

Description

FileUtils.cp will always preserve the permission of original files even if we passed :preserve=>false.

I think the problem is because:

<         File.open(dest, 'wb') do |f|
---
>         File.open(dest, 'wb', s.stat.mode) do |f|
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0