Renamed resource "Disks" in the "Share"

master3.3
Самоукин Алексей 14 years ago
parent b9da3e553f
commit 74f05ae95a

@ -327,7 +327,7 @@ class client(share, commandServer, encrypt):
logOutFile = ".logout"
# Файлы котороые не удаляются при очистке домашней директории
skipHomeFile = ["Home","Disks","FTP",logOutFile,configFileDesktop]
skipHomeFile = ["Home","Disks","Share","FTP",logOutFile,configFileDesktop]
# словарь опций сервисов из /var/calculate/remote/server.env
optionsInfo = {}
@ -385,7 +385,7 @@ class client(share, commandServer, encrypt):
# Pесурс share
name = "share"
dictResources[name] = {"resource":"share",
"path":os.path.join(homeDir,"Disks")}
"path":os.path.join(homeDir,"Share")}
names.append(name)
# Ресурс шаблонов
name = "profile"
@ -1193,7 +1193,7 @@ class client(share, commandServer, encrypt):
movedPath = os.path.join('Home',"Moved")
skipPaths = self.clVars.Get("cl_moved_skip_path")
if not skipPaths:
skipPaths = ['Disks','Home','Moved','FTP','Desktop']
skipPaths = ['Disks','Share','Home','Moved','FTP','Desktop']
filesAndDir = filter(lambda x: not ('.' in x[0] or x in\
skipPaths or os.path.islink(x)),
os.listdir('.'))
@ -1454,6 +1454,14 @@ class client(share, commandServer, encrypt):
except:
self.printERROR(_("Can not remove dir %s")% path)
return False
# Удаляем Disks директорию если она пуста
pathDisks = os.path.join(homeDir,"Disks")
if os.path.exists(pathDisks) and not os.listdir(pathDisks):
try:
os.rmdir(pathDisks)
except:
self.printERROR(_("Can not remove dir %s")% pathDisks)
return False
if needSync:
self.printSUCCESS(_("Saved a user profile in the domain"))
self.printOK(_("Umounted user resource in domain") + " ...")

Loading…
Cancel
Save