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,6 +103,7 @@ def mkfile(name, data = ""):
return return
if islink: if islink:
curdir = os.getcwd() curdir = os.getcwd()
if path:
os.chdir(path) os.chdir(path)
os.symlink(link, os.path.basename(filename)) os.symlink(link, os.path.basename(filename))
os.chdir(curdir) os.chdir(curdir)