Skip to content

File modification time not properly set #5533

@cshupp1

Description

@cshupp1

This might be a windows only issue (Windows 10).

Consider the following portion of a directory listing:

-rw-r--r-- 1 cshupp 197121   0 Aug 26 21:03 uts_dif.log.age

Now consider the following irb:

$ java -jar C:\Users\cshupp\Downloads\jruby-complete-9.2.5.0.jar -Sjirb
irb(main):001:0> a = 'uts_dif.log.age'
=> "uts_dif.log.age"
irb(main):002:0> require 'fileutils'
=> true
irb(main):003:0> FileUtils.touch a
=> ["uts_dif.log.age"]

Note the touch did not change mtime.

-rw-r--r-- 1 cshupp 197121   0 Aug 26 21:03 uts_dif.log.age

Now consider this irb session:

java -jar C:\Users\cshupp\Downloads\jruby-complete-9.1.10.0.jar -Sjirb
irb(main):001:0> require 'fileutils
irb(main):005:0> a = 'uts_dif.log.age'
=> "uts_dif.log.age"
irb(main):006:0> FileUtils.touch a
=> ["uts_dif.log.age"]

Note the slightly older JRuby works as expected:

-rw-r--r-- 1 cshupp 197121   0 Dec 20 13:54 uts_dif.log.age

MRI Ruby behaves as 9.1.10.

My logging framework is utterly broken...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions