summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-10 10:48:01 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-10 10:48:01 +0000
commit765c6a80e60df2f4dedfe055cb06534c4a62c9d3 (patch)
tree68cbc031177c64bc4ec5c22f866ff03b0372eb3c /dir.c
parent683400f4278fe0db00592c06522979be845bcc45 (diff)
* dir.c (glob_helper): path is a string object now.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/dir.c b/dir.c
index 0c22522370..1e03d412f9 100644
--- a/dir.c
+++ b/dir.c
@@ -1233,7 +1233,7 @@ glob_helper(path, dirsep, exist, isdir, beg, end, flags, func, arg)
if (RSTRING(path)->len > 0) {
if (match_all && exist == UNKNOWN) {
- if (do_lstat(path, &st) == 0) {
+ if (do_lstat(RSTRING(path)->ptr, &st) == 0) {
exist = YES;
isdir = S_ISDIR(st.st_mode) ? YES : S_ISLNK(st.st_mode) ? UNKNOWN : NO;
}
@@ -1244,7 +1244,7 @@ glob_helper(path, dirsep, exist, isdir, beg, end, flags, func, arg)
}
if (match_dir && isdir == UNKNOWN) {
- if (do_stat(path, &st) == 0) {
+ if (do_stat(RSTRING(path)->ptr, &st) == 0) {
exist = YES;
isdir = S_ISDIR(st.st_mode) ? YES : NO;
}