From a71df446b6e133aa17734c719ce717c5f766ec9f Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 6 May 2008 02:48:02 +0000 Subject: [PATCH] handle absolute paths under windows that start with drive letters git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1203 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- jtag/ChangeLog | 2 ++ jtag/src/cmd/include.c | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/jtag/ChangeLog b/jtag/ChangeLog index b331c65b..cfce87d9 100644 --- a/jtag/ChangeLog +++ b/jtag/ChangeLog @@ -5,6 +5,8 @@ * src/flash/amd_flash.c: Likewise. * src/lib/safe-ctype.c: Include from libiberty as it is needed on some non-POSIX ports (like mingw). + * src/cmd/include.c (cmd_include_or_script_run): Add handling of absolute + paths under Windows that take the form :\. 2008-05-04 Mike Frysinger diff --git a/jtag/src/cmd/include.c b/jtag/src/cmd/include.c index e96c3ede..c9ba74bc 100644 --- a/jtag/src/cmd/include.c +++ b/jtag/src/cmd/include.c @@ -52,8 +52,11 @@ cmd_include_or_script_run( chain_t *chain, int is_include, char *params[] ) * assume that user wants to ignore the search path */ path = params[1]; +#ifdef __MINGW32__ + if (isalpha(*path) && path[1] == ':') path += 2; +#endif while( *path == '.' ) path++; - if(*path == '/' || ! is_include) + if(*path == '/' || *path == '\\' || ! is_include) { path = strdup(params[1]); }