1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00

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>
This commit is contained in:
Chantry Xavier 2008-01-06 10:33:17 +01:00
parent 1a0aaa20df
commit a27d7f6071

View File

@ -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: