Skip to content

Commit

Permalink
* dir.c (glob_helper): Use lstat() instead of stat() so it catches
Browse files Browse the repository at this point in the history
  a dead symlink.  Given a dead symlink named "a", Dir.glob("?")
  did catch it but Dir.glob("a") somehow didn't.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
knu committed Jun 15, 2002
1 parent 42c59aa commit 7297827
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Sat Jun 15 18:51:13 2002 Akinori MUSHA <[email protected]>

* dir.c (glob_helper): Use lstat() instead of stat() so it catches
a dead symlink. Given a dead symlink named "a", Dir.glob("?")
did catch it but Dir.glob("a") somehow didn't.

Fri Jun 14 21:01:48 2002 KONISHI Hiromasa <[email protected]>

* bcc32/mkexports.rb: insert sleep(1) for win9x.
Expand Down
2 changes: 1 addition & 1 deletion dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ glob_helper(path, sub, flags, func, arg)
#else
if (!(flags & FNM_NOESCAPE)) remove_backslashes(p);
#endif
if (stat(path, &st) == 0) {
if (lstat(path, &st) == 0) {
(*func)(path, arg);
}
else if (errno != ENOENT) {
Expand Down

0 comments on commit 7297827

Please sign in to comment.