Use glob.glob0 and lstrip instead of glob.glob.

Typos in filePaths in pspec.xml were sometimes ignored and abandoned files were not succesfully caught in some cases. Now it is fixed.

Thanks Fatih for the collaboration.
This commit is contained in:
Serdar Dalgıç
2010-02-22 06:47:48 +00:00
parent f394699f19
commit f290b85cd7
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -1,3 +1,9 @@
2010-02-12 Serdar Dalgıç <serdar@pardus.org.tr>
* pisi/operations/build.py: Use glob.glob0 and lstrip instead of
glob.glob. Typos in filePaths in pspec.xml were sometimes ignored and
abandoned files were not succesfully caught in some cases. Now it is
fixed. Thanks Fatih for the collaboration.
2010-02-12 Gökçen Eraslan <gokcen@pardus.org.tr>
* pisi/actionsapi/shelltools.py: Replace FileError with ctx.ui.error
since FileError is defined in pisitoolsfunctions.
+1 -1
View File
@@ -59,7 +59,7 @@ def get_file_type(path, pinfo_list, install_dir):
"""Return the file type of a path according to the given PathInfo
list"""
Match = lambda x: [match for match in glob.glob(install_dir + x) if pisi.util.join_path(install_dir, path).find(match) > -1]
Match = lambda x: [match for match in glob.glob0(install_dir, x.lstrip("/")) if pisi.util.join_path(install_dir, path).find(match) > -1]
def Sort(x):
x.sort(reverse=True)