Backport #6846

Please backport Feature #6845

Added by jonforums (Jon Forums) almost 8 years ago. Updated almost 8 years ago.



Please backport #6845 in time for the next 1.9.3 release.

As Hiroshi mentioned, we've successfully included DuĊĦan's original patch in TCS Ruby 1.9.3 releases for many months with no reported issues.

Thank you, Jon


backport_stat.patch (4.77 KB) backport_stat.patch h.shirosaki (Hiroshi Shirosaki), 08/21/2012 09:05 AM

Related issues

Related to Ruby master - Feature #6845: Optimize stat on WindowsClosedh.shirosaki (Hiroshi Shirosaki)08/09/2012Actions

Updated by naruse (Yui NARUSE) almost 8 years ago

  • Status changed from Open to Feedback

The change won't be merged to 1.9.3 without conflict.

Updated by jonforums (Jon Forums) almost 8 years ago

Are you OK with merging the change if one of us provides a no-conflict patch based upon ruby_1_9_3@36735?

Updated by h.shirosaki (Hiroshi Shirosaki) almost 8 years ago

I resolved conflicts.
make, make test, make test-all look fine with mingw32 build on Win7.


Updated by naruse (Yui NARUSE) almost 8 years ago

  • Status changed from Feedback to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r36792.
Jon, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

merge revision(s) 36668: [Backport #6846]

* test/ruby/test_file_exhaustive.rb
  (TestFileExhaustive#test_stat_special_file): add a test.
  GetFileAttributesExW fails to get attributes of special files
  such as pagefile.sys.

* win32/win32.c (check_valid_dir): for performance, check the path
  by FindFirstFileW only if the path contains "...".

* win32/win32.c (winnt_stat): use GetFileAttributesExW instead of
  FindFirstFileW since GetFileAttributesExW is faster.
  Based on the patch by Dusan D. Majkic.
  [ruby-core:47083] [Feature #6845]

Also available in: Atom PDF