summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChantry Xavier <shiningxc@gmail.com>2008-01-06 10:33:17 +0100
committerChantry Xavier <shiningxc@gmail.com>2008-01-06 10:33:17 +0100
commita27d7f6071969623362785df50546cf48e8f1d2e (patch)
tree8c1b5c1aad7e69f28ab62d0af9ba9db7f67f404f
parent1a0aaa20df29234250ecc0f9fc3f56bb8cf22ca1 (diff)
downloadpacman-a27d7f6071969623362785df50546cf48e8f1d2e.tar.gz
pacman-a27d7f6071969623362785df50546cf48e8f1d2e.tar.xz
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 <shiningxc@gmail.com>
-rwxr-xr-xpactest/util.py3
1 files changed, 2 insertions, 1 deletions
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: