|
|
|
@ -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):
|
|
|
|
|
"""
|
|
|
|
|