>From 0c0376e76e6448d01a41a9cfe2e568a5411c07ad Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 9 Sep 2017 10:21:00 +0200 Subject: [PATCH 15/16] gnulib-tool.py: follow gnulib-tool changes, part 11 Follow gnulib-tool change from 2014-12-02 "gnulib-tool: recognize x:* as an absolute path" --- pygnulib/constants.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pygnulib/constants.py b/pygnulib/constants.py index 6cb1ec9..9e0f194 100644 --- a/pygnulib/constants.py +++ b/pygnulib/constants.py @@ -344,16 +344,16 @@ def link_relative(src, dest): else: # if dest has not bytes or string type raise(TypeError( 'dest must be a string, not %s' % (type(dest).__name__))) - if src.startswith('/'): + if src.startswith('/') or (len(src) >= 2 and src[1] == ':'): os.symlink(src, dest) - else: # if not src.startswith('/') - if dest.startswith('/'): + else: # if src is not absolute + if dest.startswith('/') or (len(dest) >= 2 and dest[1] == ':'): if not constants.PYTHON3: cwd = os.getcwdu() else: # if constants.PYTHON3 cwd = os.getcwd() os.symlink(joinpath(cwd, src), dest) - else: # if not dest.startswith('/') + else: # if dest is not absolute destdir = os.path.dirname(dest) if not destdir: destdir = '.' -- 2.7.4