Actions
Bug #9748
closedFileUtils.cp always preserve the permission of original files
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-linux]
Backport:
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|
Updated by nobu (Nobuyoshi Nakada) over 10 years ago
- Description updated (diff)
- Status changed from Open to Rejected
It is same as cp
command.
Updated by wehu (Wei Hu) over 10 years ago
Thanks,Nobuyoshi. I wondered that also. However, If so, the behavior is different from ruby 2.1.1's document. Also, :preserve=>true or :perserve=>false makes no difference. Is it expected?
Updated by nobu (Nobuyoshi Nakada) over 10 years ago
- Category set to doc
- Status changed from Rejected to Open
- Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN to 2.0.0: REQUIRED, 2.1: REQUIRED
Thank you, I'll fix the document.
Updated by nobu (Nobuyoshi Nakada) over 10 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
Applied in changeset r45604.
fileutils.rb: [DOC] update rdoc
- lib/fileutils.rb (FileUtils#copy_entry): update rdoc about
preserve option and permissions, following r31123.
[ruby-core:62065] [Bug #9748]
Updated by usa (Usaku NAKAMURA) over 10 years ago
- Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED to 2.0.0: DONE, 2.1: REQUIRED
Backported into ruby_2_0_0 at r46158.
Updated by nagachika (Tomoyuki Chikanaga) over 10 years ago
- Backport changed from 2.0.0: DONE, 2.1: REQUIRED to 2.0.0: DONE, 2.1: DONE
r45604 was backported into ruby_2_1
branch at r46192.
Actions
Like0
Like0Like0Like0Like0Like0Like0