[bsdgrep] --exclude-dir doesn't work

看板FB_current作者時間14年前 (2011/08/09 21:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/3 (看更多)
It seems fnmatch(3) args were accidentally swapped. Try $ bsdgrep -Fr --exclude-dir '*.svn*' grep_ usr.bin/grep | bsdgrep -c svn 72 %% Index: usr.bin/grep/util.c =================================================================== --- usr.bin/grep/util.c (revision 224705) +++ usr.bin/grep/util.c (working copy) @@ -84,7 +84,7 @@ dir_matching(const char *dname) for (unsigned int i = 0; i < dpatterns; ++i) { if (dname != NULL && - fnmatch(dname, dpattern[i].pat, 0) == 0) { + fnmatch(dpattern[i].pat, dname, 0) == 0) { if (dpattern[i].mode == EXCL_PAT) return (false); else %% _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
文章代碼(AID): #1EGI-Fia (FB_current)
文章代碼(AID): #1EGI-Fia (FB_current)