From: grzegorz@... (Grzegorz Chrupala) Date: 2003-06-30T16:54:54+09:00 Subject: Re: FileUtils - :preserve does not preserve mtime of directories on Windoze nobu.nokada@softhome.net wrote in message news:<200306271233.h5RCXuuG023771@sharui.nakada.kanuma.tochigi.jp>... > Hi, > > At Fri, 27 Jun 2003 19:25:25 +0900, > Grzegorz Chrupala wrote: > > I have been trying to copy whole directory trees while preserving > > mtime of subdirectories and file, using FileUtils.cp_r with the > > :preserve option. Works as expected on Linux, but on Windows only the > > mtime of files is preserved, while directories' mtime is set to > > current time. Is this a bug or a limitation of Windoze? > > It works on NT series. I have tested it on three different Win2000 boxes. On one it works fine, on two I get: Microsoft Windows 2000 [Versi�n 5.00.2195] (C) Copyright 1985-2000 Microsoft Corp. C:\>ruby -v ruby 1.8.0 (2003-05-26) [i386-mswin32] C:\>ruby require 'fileutils' puts File.stat('foo').mtime FileUtils.cp_r('foo','bar',:preserve=>true) puts File.stat('bar').mtime ^Z Mon Jun 30 09:27:07 Hora de verano romance 2003 Mon Jun 30 09:34:08 Hora de verano romance 2003 I guess now I should try to find out what's different in those two cases. -- Grzegorz http://pithekos.net