[X2Go-Commits] python-x2go.git - master (branch) updated: 0.4.0.3-3-gc0c6a03

X2Go dev team git-admin at x2go.org
Fri Apr 26 11:13:00 CEST 2013


The branch, master has been updated
       via  c0c6a0345eeff213215baa0bd7e36bdc8a8211e5 (commit)
      from  3f1f84b0669369418b68facf23b39026c9f50f9c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit c0c6a0345eeff213215baa0bd7e36bdc8a8211e5
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Fri Apr 26 11:12:56 2013 +0200

    Save exports in session profile directly after mounting/unmounting a share if the session profile parameter restoreexports is set.

-----------------------------------------------------------------------

Summary of changes:
 debian/changelog |    4 +++-
 x2go/registry.py |    8 --------
 x2go/session.py  |    9 +++++++++
 3 files changed, 12 insertions(+), 9 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index a00239b..1a70e8c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
 python-x2go (0.4.0.4-0~x2go1) UNRELEASED; urgency=low
 
-  * Continue development...
+  * New upstream version (0.4.0.4):
+    - Save exports in session profile directly after mounting/unmounting a share
+      if the session profile parameter restoreexports is set.
 
  -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Sun, 21 Apr 2013 23:21:29 +0200
 
diff --git a/x2go/registry.py b/x2go/registry.py
index 86521c0..2bd2d14 100644
--- a/x2go/registry.py
+++ b/x2go/registry.py
@@ -333,10 +333,6 @@ class X2GoSessionRegistry(object):
                 if _profile_name in self.master_sessions.keys():
                     if self.master_sessions[_profile_name] == self(_session_uuid):
 
-                        # save exported folders to session profile config if requested by session profile parameter ,,restoreexports''...
-                        if self.client_instance and self(_session_uuid).restore_shared_local_folders:
-                            self.client_instance.set_profile_config(_profile_name, 'export', self(_session_uuid)._restore_exported_folders)
-
                         self(_session_uuid).unset_master_session()
                         del self.master_sessions[_profile_name]
 
@@ -350,10 +346,6 @@ class X2GoSessionRegistry(object):
                 if _profile_name in self.master_sessions.keys():
                     if self.master_sessions[_profile_name] == self(_session_uuid):
 
-                        # save exported folders to session profile config if requested by session profile parameter ,,restoreexports''...
-                        if self.client_instance and self(_session_uuid).restore_shared_local_folders:
-                            self.client_instance.set_profile_config(_profile_name, 'export', self(_session_uuid)._restore_exported_folders)
-
                         self(_session_uuid).unset_master_session()
                         del self.master_sessions[_profile_name]
 
diff --git a/x2go/session.py b/x2go/session.py
index 1c94138..7573e3f 100644
--- a/x2go/session.py
+++ b/x2go/session.py
@@ -370,6 +370,7 @@ class X2GoSession(object):
         self._progress_status = 0
         self._lock = threading.Lock()
 
+        self._restore_exported_folders = {}
         if self.client_instance and self.restore_shared_local_folders:
             self._restore_exported_folders = self.client_instance.get_profile_config(self.profile_name, 'export')
 
@@ -2534,6 +2535,10 @@ class X2GoSession(object):
                         if local_path in self._restore_exported_folders.keys():
                             self._restore_exported_folders[local_path] = False
 
+                # save exported folders to session profile config if requested by session profile parameter ,,restoreexports''...
+                if self.client_instance and self.restore_shared_local_folders:
+                    self.client_instance.set_profile_config(_profile_name, 'export', self._restore_exported_folders)
+
         else:
             raise x2go_exceptions.X2GoSessionException('this X2GoSession object does not have any associated terminal')
         return retval
@@ -2603,6 +2608,10 @@ class X2GoSession(object):
                     # if unmounting failed restore the status with ,,mounted'', not sure if that works ok...
                     self.shared_folders[local_path]['status'] = 'mounted'
 
+                # save exported folders to session profile config if requested by session profile parameter ,,restoreexports''...
+                if self.client_instance and self.restore_shared_local_folders:
+                    self.client_instance.set_profile_config(_profile_name, 'export', self._restore_exported_folders)
+
         else:
             raise x2go_exceptions.X2GoSessionException('this X2GoSession object does not have any associated terminal')
 


hooks/post-receive
-- 
python-x2go.git (Python X2Go Client API)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "python-x2go.git" (Python X2Go Client API).




More information about the x2go-commits mailing list