[PATCH] isofs: show hidden files, add granularity for assoc/hidden files flags
[linux-2.6.git] / fs / isofs / namei.c
index 690edf3..e37e82b 100644 (file)
@@ -131,14 +131,16 @@ isofs_find_entry(struct inode *dir, struct dentry *dentry,
                }
 
                /*
-                * Skip hidden or associated files unless unhide is set 
+                * Skip hidden or associated files unless hide or showassoc,
+                * respectively, is set
                 */
                match = 0;
                if (dlen > 0 &&
-                   (!(de->flags[-sbi->s_high_sierra] & 5)
-                    || sbi->s_unhide == 'y'))
-               {
-                       match = (isofs_cmp(dentry,dpnt,dlen) == 0);
+                       (sbi->s_hide =='n' ||
+                               (!(de->flags[-sbi->s_high_sierra] & 1))) &&
+                       (sbi->s_showassoc =='y' ||
+                               (!(de->flags[-sbi->s_high_sierra] & 4)))) {
+                       match = (isofs_cmp(dentry, dpnt, dlen) == 0);
                }
                if (match) {
                        isofs_normalize_block_and_offset(de,
@@ -146,11 +148,11 @@ isofs_find_entry(struct inode *dir, struct dentry *dentry,
                                                         &offset_saved);
                         *block_rv = block_saved;
                         *offset_rv = offset_saved;
-                       if (bh) brelse(bh);
+                       brelse(bh);
                        return 1;
                }
        }
-       if (bh) brelse(bh);
+       brelse(bh);
        return 0;
 }