bug-global
[Top][All Lists]
Advanced

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

Re: global project root on windows


From: Jason Hood
Subject: Re: global project root on windows
Date: Thu, 16 Jul 2015 17:47:43 +1000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

On 10/07/2015 9:47, Leo Liu wrote:
> There is a PR to ggtags to force a project root on windows due to some
> "subst" path issues on windows.

Do you mean if you subst the project root, set GTAGSROOT to it, then use
global in the original directory (or vice versa) the relative path is wrong?
In that case, the patch below detects different drives and uses the
absolute path.

diff -urp global-6.5/global/convert.c global-6-5/global/convert.c
--- global-6.5/global/convert.c 2015-06-10 11:45:07 +1000
+++ global-6-5/global/convert.c 2015-07-16 17:13:54 +1000
@@ -286,6 +286,10 @@ convert_pathname(CONVERT *cv, const char
                        a = strbuf_value(cv->abspath);
                        b = cv->basedir;
 #if defined(_WIN32) || defined(__DJGPP__)
+                       if (tolower(*a) != tolower(*b)) {
+                               path = a;
+                               break;
+                       }
                        while (*a != '/')
                                a++;
                        while (*b != '/')

-- 
Jason.



reply via email to

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