Re: global project root on windows

Jason Hood <[email protected]>
Newsgroups gmane.comp.gnu.global.bugs
Message-ID <[email protected]>
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.