diff --git a/pym/cl_client.py b/pym/cl_client.py index 9826e59..04e0818 100644 --- a/pym/cl_client.py +++ b/pym/cl_client.py @@ -2048,18 +2048,13 @@ or ld_bind_dn or ld_bind_pw") os.unlink(fd) else: filesDir.append(fd) - # Нахождение файлов отличных от иконок в Desktop + # Нахождение файлов отличных от иконок и ссылок в Desktop pathDesktop = './Desktop' filesDirDesk = [] if os.path.exists(pathDesktop): - filesAndDirDesk = map(lambda x:os.path.join(pathDesktop,x),\ - filter(lambda x:not x.rpartition('.')[2]=='desktop',\ - os.listdir(pathDesktop))) - for fd in filesAndDirDesk: - if os.path.islink(fd): - os.unlink(fd) - else: - filesDirDesk.append(fd) + filesDirDesk = map(lambda x: os.path.join(pathDesktop,x),\ + filter(lambda x: not os.path.islink(fd) or\ + not x.rpartition('.')[2]=='desktop', os.listdir(pathDesktop))) movedPathDesk = os.path.join(movedPath, pathDesktop) filesDir += filesDirDesk if not filesDir or not os.path.exists("Home"):