From a1fa0d8e9e53af735fae7f97bca4ab34e0e8c844 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=B0=D0=BC=D0=BE=D1=83=D0=BA=D0=B8=D0=BD=20=D0=90?= =?UTF-8?q?=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?= Date: Fri, 19 Mar 2010 17:54:55 +0300 Subject: [PATCH] bugfix --- pym/cl_profile.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/pym/cl_profile.py b/pym/cl_profile.py index dfce974..703883f 100644 --- a/pym/cl_profile.py +++ b/pym/cl_profile.py @@ -2610,9 +2610,6 @@ class profile(_file, _terms, xmlShare, processingTemplates): cl_base.exit(1) if len(terms) == 1: fileName = terms[0].strip() - if fileName[0] != "/": - path = os.path.split(nameSystemFile)[0] - fileName=os.path.join(path,fileName) # Если домашняя директория if fileName[0] == "~": # Получаем информацию о пользователе @@ -2620,11 +2617,11 @@ class profile(_file, _terms, xmlShare, processingTemplates): # Получаем директорию пользователя fileName = os.path.join(homeDir, fileName.partition("/")[2], "")[:-1] - else: - fileName = terms[1].strip() - if fileName[1] != "/": + elif fileName[0] != "/": path = os.path.split(nameSystemFile)[0] fileName=os.path.join(path,fileName) + else: + fileName = terms[1].strip() # Если домашняя директория if fileName[0] == "~": # Получаем информацию о пользователе @@ -2632,6 +2629,9 @@ class profile(_file, _terms, xmlShare, processingTemplates): # Получаем директорию пользователя fileName = os.path.join(homeDir, fileName.partition("/")[2], "")[:-1] + elif fileName[1] != "/": + path = os.path.split(nameSystemFile)[0] + fileName=os.path.join(path,fileName) replace = "" if os.path.exists(fileName): FD = open(fileName) @@ -3274,6 +3274,12 @@ class profile(_file, _terms, xmlShare, processingTemplates): else: tmpDirsProfiles.append(False) dirsProfiles = tmpDirsProfiles + #scanObj = processingTemplates() + + #scanObj.processingFile = lambda *x: x[1] + # Считаем количество файлов + #for dirTemplate in dirsProfiles: + # тестовое значение количества профилей numberAllProfiles = 1000 self.numberAllProfiles(numberAllProfiles)