Commit 7bc06d74 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Use join in str to ignore an absolute path. Import product_path from ERP5.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5141 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c302240d
......@@ -35,6 +35,7 @@ from Products.ExtFile.ExtImage import ExtImage
import os
from App.config import getConfiguration
from Globals import package_home
from Products.ERP5 import product_path
from zLOG import LOG
......@@ -74,8 +75,8 @@ class ExtFolder( XMLObject ):
"""Return the path in the filesystem.
"""
instance_home = getConfiguration().instancehome
repository = os.path.join(ExtFile._repository)
return os.path.join(instance_home, repository, self.getPath())
repository = os.path.join(*ExtFile._repository)
return os.path.sep.join((instance_home, repository, self.getPath()))
security.declareProtected('Manage portal', 'PUT_factory')
def generateRpmHeaderList(self):
......@@ -89,7 +90,6 @@ class ExtFolder( XMLObject ):
def generateBt5HeaderList(self):
"""Run genbt5list on the directory behind this object.
"""
product_path = package_home( globals() )
status = os.system("%s/bin/genbt5list %s" % (product_path, self._getRepositoryPath()))
if status != 0:
raise RuntimeError, "failed in executing genbt5list"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment