Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.5
-
Fix Version/s: JRuby 1.5.1, JRuby 1.6RC1
-
Component/s: Standard Library, Windows
-
Labels:None
-
Environment:Windows XP
-
Testcase included:yes
-
Number of attachments :
Description
The attached spec compares the mtime of a directory before and after invoking FileUtils.touch on that directory. The spec fails since the mtime is not modified. Invoking touch on the same directory via cygwin does correctly update the mtime.
Activity
Vladimir Sizikov
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Fix Version/s | JRuby 1.5.1 [ 16519 ] | |
| Component/s | Windows [ 13600 ] |
Pepijn Van Eeckhoudt
made changes -
| Attachment | dir_mtime.patch [ 49355 ] |
Vladimir Sizikov
made changes -
| Assignee | Thomas E Enebo [ enebo ] | Vladimir Sizikov [ vvs ] |
Charles Oliver Nutter
made changes -
| Fix Version/s | JRuby 1.5.1 [ 16519 ] |
Pepijn Van Eeckhoudt
made changes -
| Attachment | dir_mtime2.patch [ 49405 ] |
Thomas E Enebo
made changes -
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Assignee | Vladimir Sizikov [ vvs ] | Thomas E Enebo [ enebo ] |
| Fix Version/s | JRuby 1.6 [ 16275 ] | |
| Resolution | Fixed [ 1 ] |
Charles Oliver Nutter
made changes -
| Status | Resolved [ 5 ] | Closed [ 6 ] |
Some further investigation showed that the problem is in the jnr-posix library. It attempts to use the _utime64 function from msvcrt. The documentation of this function clearly states this does not work on directories. I've modified the windows posix implementation to use SetFileTime instead of _utime64 (see attached patch). This works on both files and directories.