References are not transferred from the ~/.Desktop directory to the directory ~/Moved

develop
Самоукин Алексей 15 years ago
parent 07dee53b94
commit 1b78a28ceb

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

Loading…
Cancel
Save