From 05bcf23f91a159aab62aa412b688c19518bbfcdc 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: Mon, 18 Jan 2010 10:14:43 +0300 Subject: [PATCH] Changed algorithm for searching files in the directory ~./Desktop --- pym/cl_client.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pym/cl_client.py b/pym/cl_client.py index 1425bc5..583cddb 100644 --- a/pym/cl_client.py +++ b/pym/cl_client.py @@ -2052,9 +2052,10 @@ or ld_bind_dn or ld_bind_pw") pathDesktop = './Desktop' filesDirDesk = [] if os.path.exists(pathDesktop): - filesDirDesk = map(lambda x: os.path.join(pathDesktop,x),\ - filter(lambda x: not os.path.islink(x) or\ - not x.rpartition('.')[2]=='desktop', os.listdir(pathDesktop))) + filesDirDesk = filter(lambda x: not os.path.islink(x) and\ + not x.rpartition('.')[2]=='desktop',\ + map(lambda x: os.path.join(pathDesktop,x),\ + os.listdir(pathDesktop))) movedPathDesk = os.path.join(movedPath, pathDesktop) filesDir += filesDirDesk if not filesDir or not os.path.exists("Home"):