From: "luislavena (Luis Lavena)" Date: 2012-11-17T21:33:30+09:00 Subject: [ruby-core:49490] [ruby-trunk - Bug #7374] File.expand_path resolving to first file/dir instead of absolute path Issue #7374 has been updated by luislavena (Luis Lavena). % Done changed from 100 to 50 h.shirosaki (Hiroshi Shirosaki) wrote: > It seems if the last part of the path contains * or ?, FindFirstFileW should not be used since FindFirstFileW expands wildcard. > Thank you Shirosaki, I did a naive fix and completely missed "?" character. Will modify replace_to_long_name to check for this. ---------------------------------------- Bug #7374: File.expand_path resolving to first file/dir instead of absolute path https://bugs.ruby-lang.org/issues/7374#change-33021 Author: mdube@arcane-technologies.com (Martin Dub��) Status: Assigned Priority: High Assignee: luislavena (Luis Lavena) Category: core Target version: 2.0.0 ruby -v: ruby 1.9.3p327 (2012-11-10) [i386-mingw32] =begin (({File.expand_path("./*", "c:)"})) will give "c:/$recycle.bin" as result instead of "c:/*" (({File.expand_path("./*", "c:/temp)"})) will give "c:/temp/." as result instead of "c:/temp/*" It looks like the first directory entry is returned instead of the absolute path. =end -- http://bugs.ruby-lang.org/