bug-global
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patch for libutil]


From: Mathieu Virbel
Subject: [patch for libutil]
Date: Mon, 23 Oct 2006 13:23:37 +0200
User-agent: Thunderbird 1.5.0.5 (X11/20060807)

Hi,

Here is a patch to skip unreadable files while we launch gtags from commandline... (actually, gtags stop parsing when he found a dead-symlink).

Regards,

Mathieu Virbel
diff -u global-5.2.save/libutil/find.c global-5.2/libutil/find.c
--- global-5.2.save/libutil/find.c      Mon Oct 23 10:32:32 2006
+++ global-5.2/libutil/find.c   Mon Oct 23 10:46:56 2006
@@ -504,6 +504,11 @@
                                strlimcpy(path, makepath(dir, unit, NULL), 
sizeof(path));
                                if (skipthisfile(path))
                                        continue;
+
+                               /* skip unreadable file */
+                               if (!test("r",path))
+                                       continue;
+
                                /*
                                 * GLOBAL cannot treat path which includes 
blanks.
                                 * It will be improved in the future.
@@ -588,6 +593,8 @@
                        /* skip empty line.  */
                        continue;
                }
+               if (!test("r", path))
+                       continue;
                if (!test("f", path)) {
                        if (!qflag) {
                                if (test("d", path))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]