diff options
author | Eli Zaretskii <eliz@gnu.org> | 2010-07-09 11:40:19 +0000 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2010-07-09 11:40:19 +0000 |
commit | 587588c1fa061de3ca46163a8f01cb1b2cb63a37 (patch) | |
tree | 3027752f46f15b7ac38fcd05528adf999bacc0a1 | |
parent | 94bda718c4b7131b48eda8c6e7c0afe79e2b7d89 (diff) | |
download | gunmake-587588c1fa061de3ca46163a8f01cb1b2cb63a37.tar.gz |
Fix Savannah bug #30312.
function.c (abspath): Support absolute file names in UNC format.
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | function.c | 7 |
2 files changed, 10 insertions, 0 deletions
@@ -1,5 +1,8 @@ 2010-07-09 Eli Zaretskii <eliz@gnu.org> + * function.c (abspath): Support absolute file names in UNC format. + (Savannah bug #30312.) + * job.c (pid2str) [WINDOWS32]: Don't use %Id with GCC < 4.x. (exec_command) [WINDOWS32]: Use pid2str instead of non-portable %Id. @@ -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 |