in reply to Re^2: file timestamp and Windows 7
in thread file timestamp and Windows 7

Sorry, my mistake: On Windows 7 the file timestamp is not updated as it is updated on Windows XP.

When it fails to update the timestamp, it should set errno, so what is errno set to?

utime(time, time, $file) or die sprintf "ERRRR(%d)(%s)(%d)(%s)", $!,$!,$^E,$^E;

Replies are listed 'Best First'.
Re^4: file timestamp and Windows 7
by momo33 (Beadle) on Jan 05, 2011 at 10:01 UTC
    A mystery: with the die-error it works fine, without it does not. Maybe a weird bug somewhere. Thank you both!
      A mystery: with the die-error it works fine, without it does not. Maybe a weird bug somewhere. Thank you both!

      Sorry momo33, its most likely PEBKAC :)

      $ perl -MFile::Spec -Mautodie=utime -e"utime undef, undef, File::Spec- +>devnull" Can't utime(undef, undef, 'nul'): Invalid argument at -e line 1