summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-04 03:19:57 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-04 03:19:57 +0000
commit859ae7764c69e6418945c96c596e55924d5dd8b8 (patch)
treeb96bb28629f16c308f7a052e74e244cd51353c56 /dir.c
parent4f431224965e4c986525309c7bbc298b9ae3d95f (diff)
Revert "dir.c: glob cases on case-insensitive system"
This reverts commit r44796. * dir.c (glob_helper): return the filename with actual cases on the filesystem if it is case-insensitive. [ruby-core:42469] [Feature #5994] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/dir.c b/dir.c
index d28037a..4fe2c88 100644
--- a/dir.c
+++ b/dir.c
@@ -1397,29 +1397,14 @@ glob_helper(
if (exist == NO || isdir == NO) return 0;
- if (magical || recursive || ((FNM_SYSCASE || HAVE_HFS) && plain)) {
+ if (magical || recursive) {
struct dirent *dp;
DIR *dirp;
IF_HAVE_HFS(int hfs_p);
dirp = do_opendir(*path ? path : ".", flags, enc);
- if (dirp == NULL) {
-# if FNM_SYSCASE || HAVE_HFS
- if (!(magical || recursive) && (errno == EACCES)) {
- /* no read permission, fallback */
- goto literally;
- }
-# endif
- return 0;
- }
+ if (dirp == NULL) return 0;
IF_HAVE_HFS(hfs_p = is_hfs(dirp));
-# if HAVE_HFS
- if (!(hfs_p || magical || recursive)) {
- closedir(dirp);
- goto literally;
- }
- flags |= FNM_CASEFOLD;
-# endif
while ((dp = READDIR(dirp, enc)) != NULL) {
char *buf;
enum answer new_isdir = UNKNOWN;
@@ -1501,9 +1486,6 @@ glob_helper(
else if (plain) {
struct glob_pattern **copy_beg, **copy_end, **cur2;
-# if FNM_SYSCASE || HAVE_HFS
- literally:
-# endif
copy_beg = copy_end = GLOB_ALLOC_N(struct glob_pattern *, end - beg);
if (!copy_beg) return -1;
for (cur = beg; cur < end; ++cur)