mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-23 00:08:50 -05: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:
parent
1a0aaa20df
commit
a27d7f6071
@ -103,6 +103,7 @@ def mkfile(name, data = ""):
|
||||
return
|
||||
if islink:
|
||||
curdir = os.getcwd()
|
||||
if path:
|
||||
os.chdir(path)
|
||||
os.symlink(link, os.path.basename(filename))
|
||||
os.chdir(curdir)
|
||||
|
Loading…
Reference in New Issue
Block a user