[X2Go-Commits] python-x2go.git - build-baikal (branch) updated: 0.4.0.3-5-g5b554af

X2Go dev team git-admin at x2go.org
Tue Jun 18 20:29:06 CEST 2013


The branch, build-baikal has been updated
       via  5b554af5af1a2521f5d1070ea21ef4d3bf46036d (commit)
      from  24543dc5a9855bf8bb9a55381899f47af1520a47 (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 -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 debian/changelog |    3 +++
 x2go/session.py  |   16 ++++++++++------
 2 files changed, 13 insertions(+), 6 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 1a70e8c..c191470 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,9 @@ python-x2go (0.4.0.4-0~x2go1) UNRELEASED; urgency=low
   * 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.
+    - Fix the restoreexports logic on mount/unmount/unmount all requests.
+      Make sure client-side offline network shares do not get purged from the
+      session profile configuration if unavailable. (Fixes: #192). 
 
  -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Sun, 21 Apr 2013 23:21:29 +0200
 
diff --git a/x2go/session.py b/x2go/session.py
index da78b2a..6302363 100644
--- a/x2go/session.py
+++ b/x2go/session.py
@@ -2208,7 +2208,7 @@ class X2GoSession(object):
                 self.active = False
 
                 # unmount shared folders
-                self.unshare_all_local_folders(force_all=True)
+                self.unshare_all_local_folders(force_all=True, update_exported_folders=False)
 
                 self.unset_master_session()
 
@@ -2279,7 +2279,7 @@ class X2GoSession(object):
                 self.active = False
 
                 # unmount shared folders
-                self.unshare_all_local_folders(force_all=True)
+                self.unshare_all_local_folders(force_all=True, update_exported_folders=False)
 
                 self.unset_master_session()
 
@@ -2483,7 +2483,7 @@ class X2GoSession(object):
                 _exported_folders.update({ unicode(folder): True })
             for folder in _exported_folders.keys():
                 if folder in [ sf for sf in self.shared_folders.keys() if self.shared_folders[sf]['status'] == 'unmounted' ]:
-                    del _exported_folders[unicode(folder)]
+                    _exported_folders.update({ unicode(folder): False })
             self._restore_exported_folders = _exported_folders
 
     def share_local_folder(self, local_path=None, folder_name=None, update_exported_folders=True):
@@ -2524,7 +2524,7 @@ class X2GoSession(object):
                         self._update_restore_exported_folders()
                     retval = True
                 else:
-                    # remove local_path from folder again if the mounting process failed
+                    # remove local_path from folder again if the unmounting process failed
                     if self.shared_folders[local_path]['status'] == 'new':
                         del self.shared_folders[local_path]
                     else:
@@ -2536,7 +2536,8 @@ class X2GoSession(object):
                             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:
+                if update_exported_folders and self.client_instance and self.restore_shared_local_folders:
+                    self._update_restore_exported_folders()
                     self.client_instance.set_profile_config(self.profile_name, 'export', self._restore_exported_folders)
 
         else:
@@ -2570,6 +2571,7 @@ class X2GoSession(object):
                             self.logger('%s' % str(e), loglevel=log.loglevel_WARN)
                     if update_exported_folders:
                         self._update_restore_exported_folders()
+                        self.client_instance.set_profile_config(self.profile_name, 'export', self._restore_exported_folders)
                 else:
                     self.HOOK_foldersharing_not_available()
         return retval
@@ -2609,7 +2611,8 @@ class X2GoSession(object):
                     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:
+                if update_exported_folders and self.client_instance and self.restore_shared_local_folders:
+                    self._update_restore_exported_folders()
                     self.client_instance.set_profile_config(self.profile_name, 'export', self._restore_exported_folders)
 
         else:
@@ -2650,6 +2653,7 @@ class X2GoSession(object):
                         retval = self.unshare_local_folder(_folder, update_exported_folders=False) and retval
                     if update_exported_folders:
                         self._update_restore_exported_folders()
+                        self.client_instance.set_profile_config(self.profile_name, 'export', self._restore_exported_folders)
                     return retval
         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