Исправлено отключение ресурсов пользователя

master3.3
Mike khiretskiy 11 years ago
parent 93f08d9d8a
commit 4d973404b9

@ -90,7 +90,7 @@ class Desktop:
if error:
# заархивировать текущий профиль и удалить его
if recreateOnError:
self.printWARNING(_("Recreating the encryption data"))
self.printSUCCESS(_("Recreating the encryption data"))
if self.getMountUserPaths(userDir):
raise DesktopError(_("Failed to use directory encryption"))
for source in (userDir,ecryptfsPath):

@ -6,7 +6,7 @@ import pwd
from calculate.lib.datavars import Variable,VariableError,ReadonlyVariable, \
ReadonlyTableVariable,FieldValue
from calculate.lib.variables.user import VariableUrLogin
from calculate.lib.utils.files import readLinesFile,process
from calculate.lib.utils.files import readLinesFile,process,isMount
from calculate.desktop._cl_keys import getKey
from itertools import *
from calculate.lib.cl_template import (templateFunction,iniParser)
@ -260,12 +260,15 @@ class VariableUrMountDirs(ReadonlyVariable):
mountProfileDir = path.join(dirStart, ".%s" %dirEnd)
mountRemoteProfileDir = path.join(dirStart, ".%s.remote" %dirEnd)
return filter(lambda x:x != homeDir,
directories = filter(lambda x:x != homeDir,
filter(lambda x: (x.startswith(homeDir) or
x.startswith(mountProfileDir) or
x.startswith(mountRemoteProfileDir)),
map(lambda x: x.split(" ")[1],
readLinesFile('/proc/mounts'))))
if isMount(homeDir):
directories.append(homeDir)
return sorted(directories,reverse=True)
class VariableUrPassword(ReadonlyVariable):
"""

Loading…
Cancel
Save