diff --git a/data/logout.d/95syncface b/data/logout.d/95syncface index e8699a0..870ccad 100644 --- a/data/logout.d/95syncface +++ b/data/logout.d/95syncface @@ -24,6 +24,7 @@ get_kdm_icon_face_dir() { get_sddm_icon_face_dir() { local config_file=/etc/sddm.conf if [[ -f $config_file ]] + then if grep ^FacesDir $config_file &>/dev/null then sed -rn 's/^FacesDir=(.*)/\1/p' $config_file diff --git a/pym/desktop/desktop.py b/pym/desktop/desktop.py index 3d7b893..0d034ea 100644 --- a/pym/desktop/desktop.py +++ b/pym/desktop/desktop.py @@ -119,15 +119,22 @@ class Desktop(MethodsInterface): _(": ") + _("The home directory contains mount points")) # поместить данные во временный tarfile - calculateName = ".calculate" - calculatePath = path.join(userDir, calculateName) + remove_files = [] tf = tempfile.TemporaryFile() - with tarfile.open(fileobj=tf, mode='w:') as tarf: - tarf.add(calculatePath, calculateName) + for fn in (".calculate", ".dmrc", ".face", ".face.icon"): + full_fn = path.join(userDir, fn) + if path.lexists(full_fn): + with tarfile.open(fileobj=tf, mode='w:') as tarf: + tarf.add(full_fn, fn) + remove_files.append(full_fn) tf.flush() tf.seek(0) # удалить эти данные - shutil.rmtree(calculatePath) + for fn in remove_files: + if not path.islink(fn) and path.isdir(fn): + shutil.rmtree(fn) + else: + os.unlink(fn) # создать шифрованные данные e = process('/usr/bin/ecryptfs-setup-private', '-u', userName,