1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-02-26 04:02:11 +01:00

Use the correct path in core.createPackageDir

The old implementation only worked, if cwd was a project working
copy (even in this case, it may did the wrong thing...).
This commit is contained in:
Marcus Huewe 2017-06-29 14:20:58 +02:00
parent ffe68fd9f4
commit c9dfe03a46

View File

@ -6794,9 +6794,9 @@ def createPackageDir(pathname, prj_obj=None):
prj_dir, pac_dir = getPrjPacPaths(pathname)
if is_project_dir(prj_dir):
global store
if not os.path.exists(pac_dir+store):
if not os.path.exists(os.path.join(pathname, store)):
prj = prj_obj or Project(prj_dir, False)
Package.init_package(prj.apiurl, prj.name, pac_dir, pac_dir)
Package.init_package(prj.apiurl, prj.name, pac_dir, pathname)
prj.addPackage(pac_dir)
print(statfrmt('A', os.path.normpath(pathname)))
else: