From 587588c1fa061de3ca46163a8f01cb1b2cb63a37 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 9 Jul 2010 11:40:19 +0000 Subject: Fix Savannah bug #30312. function.c (abspath): Support absolute file names in UNC format. --- function.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'function.c') diff --git a/function.c b/function.c index 45ebc9e..870e4a0 100644 --- a/function.c +++ b/function.c @@ -1912,6 +1912,13 @@ abspath (const char *name, char *apath) #ifdef HAVE_DOS_PATHS if (IS_PATHSEP(name[0])) { + if (IS_PATHSEP(name[1])) + { + /* A UNC. Don't prepend a drive letter. */ + apath[0] = name[0]; + apath[1] = name[1]; + root_len = 2; + } /* We have /foo, an absolute file name except for the drive letter. Assume the missing drive letter is the current drive, which we can get if we remove from starting_directory -- cgit v1.2.3