From a27d7f6071969623362785df50546cf48e8f1d2e Mon Sep 17 00:00:00 2001 From: Chantry Xavier Date: Sun, 6 Jan 2008 10:33:17 +0100 Subject: 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 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pactest/util.py b/pactest/util.py index 72777ca0..b24bfdcf 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: -- cgit v1.2.3-70-g09d2