|
|
|
@ -1999,7 +1999,8 @@ or ld_bind_dn or ld_bind_pw")
|
|
|
|
|
else:
|
|
|
|
|
filesDirDesk.append(fd)
|
|
|
|
|
movedPathDesk = os.path.join(movedPath, pathDesktop)
|
|
|
|
|
if not filesDir or not filesDirDesk or not os.path.exists("Home"):
|
|
|
|
|
filesDir += filesDirDesk
|
|
|
|
|
if not filesDir or not os.path.exists("Home"):
|
|
|
|
|
# Удаляем пустую папку Desktop
|
|
|
|
|
if os.path.exists(movedPathDesk) and not os.listdir(movedPathDesk):
|
|
|
|
|
os.rmdir(movedPathDesk)
|
|
|
|
@ -2012,25 +2013,6 @@ or ld_bind_dn or ld_bind_pw")
|
|
|
|
|
return True
|
|
|
|
|
if not os.path.exists(movedPath):
|
|
|
|
|
os.mkdir(movedPath)
|
|
|
|
|
# Перенос файлов из Desktop в Moved
|
|
|
|
|
if filesDirDesk:
|
|
|
|
|
# Создаем директорию есле она не существует
|
|
|
|
|
if not os.path.exists(movedPathDesk):
|
|
|
|
|
os.mkdir(movedPathDesk)
|
|
|
|
|
for fd in filesDirDesk:
|
|
|
|
|
execStr = "cp -r '%s' '%s'" %(fd, movedPathDesk)
|
|
|
|
|
textLine = self.execProg(execStr)
|
|
|
|
|
if not (textLine == None):
|
|
|
|
|
self.printERROR(_("Can not exec") + " " + str(execStr) +\
|
|
|
|
|
" ...")
|
|
|
|
|
return False
|
|
|
|
|
execStr = "rm -rf '%s'" %fd
|
|
|
|
|
textLine = self.execProg(execStr)
|
|
|
|
|
if not (textLine == None):
|
|
|
|
|
self.printERROR(_("Can not exec") + " " + str(execStr) +\
|
|
|
|
|
" ...")
|
|
|
|
|
return False
|
|
|
|
|
|
|
|
|
|
directFile = os.path.join(movedPath,".directory")
|
|
|
|
|
if not os.path.exists(directFile):
|
|
|
|
|
txt = "[Desktop Entry]\nIcon=folder-development"
|
|
|
|
|