From a27d7f6071969623362785df50546cf48e8f1d2e Mon Sep 17 00:00:00 2001 From: Chantry Xavier Date: Sun, 6 Jan 2008 10:33:17 +0100 Subject: [PATCH] bugfix in pactest when creating a symlink at the top level. Trying to make a symlink at the top level previously made pactest fail. For example : "test -> test2/" as a file in a package. The path to the test symlink was empty in this case, but the python code still tried to chdir in "", which failed. Signed-off-by: Chantry Xavier --- pactest/util.py | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/pactest/util.py b/pactest/util.py index 72777ca..b24bfdc 100755 --- a/pactest/util.py +++ b/pactest/util.py @@ -103,7 +103,8 @@ def mkfile(name, data = ""): return if islink: curdir = os.getcwd() - os.chdir(path) + if path: + os.chdir(path) os.symlink(link, os.path.basename(filename)) os.chdir(curdir) else: -- 1.5.4.rc2