diff --git a/pym/client/client.py b/pym/client/client.py index 783be31..e5e3fa7 100644 --- a/pym/client/client.py +++ b/pym/client/client.py @@ -250,7 +250,8 @@ class Client(commandServer, encrypt, Desktop): listTemplFile = os.path.join(pathConfig, "files.txt") # files which not cleaning from user home directory - skipHomeFile = ["Home", "Disks", "Share", "FTP", configFileDesktop] + skipHomeFile = ["Laptop", "Home", "Disks", "Share", "FTP", + configFileDesktop] # option dict of services from /var/calculate/remote/server.env optionsInfo = {} @@ -432,8 +433,9 @@ class Client(commandServer, encrypt, Desktop): """ Очистить домашнюю директорию """ - rmFiles = list(set(os.listdir(homeDir)) - \ - set(self.skipHomeFile)) + skipHomeFile = list(set(self.skipHomeFile) | + set(self.clVars.Get('cl_moved_skip_path'))) + rmFiles = list(set(os.listdir(homeDir)) - set(skipHomeFile)) for rmFile in rmFiles: delFile = os.path.join(homeDir, rmFile) if os.path.islink(delFile): @@ -737,7 +739,8 @@ class Client(commandServer, encrypt, Desktop): movedPath = path.join(resourcePath, movedDir) movedLink = path.join(userHome, movedDir) if not skipPaths: - skipPaths = ['Disks', 'Share', 'Home', 'Moved', 'FTP', 'Desktop'] + skipPaths = ['Laptop', 'Disks', 'Share', 'Home', + 'Moved', 'FTP', 'Desktop'] filesAndDir = filter(lambda x: not ( path.islink(x) or x[len(userHome) + 1:].startswith('.') or