Project

General

Profile

Actions

Feature #14169

closed

PATCH: File.lstat(filename).ino on Windows.

Added by kubo (Takehiro Kubo) over 6 years ago. Updated over 6 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:84209]

Description

On Unix, the return values of File.stat(filename) and File.lstat(filename)
are same when the file isn't a symbolic link. However they are different
on Windows. File.lstat(filename).ino is always zero. The attached patch
fixes File.lstat(filename).ino to return same value with File.stat(filename).ino.

Before the patch, File.stat() and File.lstat() calls winnt_stat() and
winnt_lstat() in win32.c respectively. After the patch, (1) winnt_lstat()
is deleted, (2) lstat argument is added to winnt_stat() and (3) reparse
point handling, which was in winnt_lstat(), is added to winnt_stat().

As far as I checked, it works fine for junctions and symbolic links as before.


Files

file_lstat_ino.patch (6.79 KB) file_lstat_ino.patch kubo (Takehiro Kubo), 12/12/2017 11:33 AM
Actions #1

Updated by usa (Usaku NAKAMURA) over 6 years ago

  • Status changed from Open to Closed

Applied in changeset trunk|r61180.


set ino at File.lstat on Windows

  • win32/win32.c (winnt_stat): support symbolic link and others.

  • win32/win32.c (w32_stati128, wstati128, name_for_stat, rb_w32_{,ul}stati128,
    wutimensat): follow above change.
    [Feature #14169]

    From: Takehiro Kubo

Updated by usa (Usaku NAKAMURA) over 6 years ago

merged. thx!

Actions

Also available in: Atom PDF

Like0
Like0Like0