diff options
author | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-08-05 09:09:35 +0000 |
---|---|---|
committer | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-08-05 09:09:35 +0000 |
commit | 5e12815fb1cbc102258bfe4904acf7e75f4c7e54 (patch) | |
tree | d680e7e4d5946ac27e6a2fa8f7dd5a9cf10ba516 /lib/fileutils.rb | |
parent | b54ac875c21cb75ac8012eb595511dde006f6bc5 (diff) | |
download | ruby-5e12815fb1cbc102258bfe4904acf7e75f4c7e54.tar.gz |
* lib/fileutils.rb (install): should preserve timestamp only.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/fileutils.rb')
-rw-r--r-- | lib/fileutils.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/fileutils.rb b/lib/fileutils.rb index d6714229a9..dfec5f9005 100644 --- a/lib/fileutils.rb +++ b/lib/fileutils.rb @@ -639,10 +639,10 @@ module FileUtils fu_each_src_dest(src, dest) do |s,d| unless FileTest.exist?(d) and compare_file(s,d) - fu_preserve_attr(options[:preserve], s, d) { - remove_file d, true - copy_file s, d - } + remove_file d, true + st = File.stat(s) if options[:preserve] + copy_file s, d + File.utime st.atime, st.mtime, d if options[:preserve] File.chmod options[:mode], d if options[:mode] end end @@ -769,7 +769,7 @@ module FileUtils 'copy' => %w( preserve noop verbose ), 'cp' => %w( preserve noop verbose ), 'cp_r' => %w( preserve noop verbose ), - 'install' => %w( mode noop verbose ), + 'install' => %w( preserve mode noop verbose ), 'link' => %w( force noop verbose ), 'ln' => %w( force noop verbose ), 'ln_s' => %w( force noop verbose ), |