[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug in gtags.vim
From: |
Jason Hood |
Subject: |
Re: bug in gtags.vim |
Date: |
Thu, 20 Jun 2013 16:54:47 +1000 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 |
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.