Project

General

Profile

Feature #14169

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

Added by kubo (Takehiro Kubo) over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
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

Associated revisions

Revision 1dcdb868
Added by usa (Usaku NAKAMURA) over 1 year ago

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 kubo@jiubao.org

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 61180
Added by usa (Usaku NAKAMURA) over 1 year ago

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 kubo@jiubao.org

Revision 61180
Added by usa (Usaku NAKAMURA) over 1 year ago

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 kubo@jiubao.org

Revision 61180
Added by usa (Usaku NAKAMURA) over 1 year ago

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 kubo@jiubao.org

History

#1

Updated by usa (Usaku NAKAMURA) over 1 year 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 kubo@jiubao.org

Also available in: Atom PDF