On 18/06/2013 20:12, yun sheng wrote:
> This happens to be a bug specifically using the Win32 version.
> `global --single-update "t.c"`
> won't refresh the gtags database correctly, it gives an error:
> `The filename, directory name, or volume lable syntax is incorrect.`

Dumb CMD.EXE (and dumb me for not testing it).  Here's the fix:

--- global~.c   2013-02-28 21:21:06.000000000 +1000
+++ global.c    2013-06-19 17:31:05.578758100 +1000
@@ -633,6 +633,13 @@
                        die("gtags command not found.");
                if (chdir(root) < 0)
                        die("cannot change directory to '%s'.", root);
+#if defined(_WIN32) && !defined(__CYGWIN__)
+               /*
+                * Get around CMD.EXE's weird quoting rules by sticking another
+                * perceived whitespace in front (also works with Take Command).
+                */
+               strbuf_putc(sb, ';');
+#endif
                strbuf_puts(sb, quote_shell(gtags_path));
                strbuf_puts(sb, " -i");
                if (vflag)

-- 
Jason.

_______________________________________________
Bug-global mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-global

Reply via email to