[Xfce4-commits] [xfce/xfce4-session] 01/01: Drop check for sessions file before it's written (Bug #11632)

noreply at xfce.org noreply at xfce.org
Sat Mar 7 17:33:04 CET 2015


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch xfce-4.12
in repository xfce/xfce4-session.

commit 364342fbd84c924783a415046f813169cf1d1a0a
Author: Eric Koegel <eric.koegel at gmail.com>
Date:   Fri Mar 6 19:55:02 2015 +0300

    Drop check for sessions file before it's written (Bug #11632)
    
    Just opening the session file in rc_open doesn't cause a write,
    so drop the unneeded check that was breaking session saves.
---
 xfce4-session/xfsm-manager.c |   30 ------------------------------
 1 file changed, 30 deletions(-)

diff --git a/xfce4-session/xfsm-manager.c b/xfce4-session/xfsm-manager.c
index 8b62607..999e420 100644
--- a/xfce4-session/xfsm-manager.c
+++ b/xfce4-session/xfsm-manager.c
@@ -1652,8 +1652,6 @@ xfsm_manager_store_session (XfsmManager *manager)
   GdkDisplay    *display;
   WnckScreen    *screen;
   XfceRc        *rc;
-  GFile         *session_file;
-  GFileInfo     *info;
   GList         *lp;
   gchar          prefix[64];
   gchar         *backup;
@@ -1673,32 +1671,6 @@ xfsm_manager_store_session (XfsmManager *manager)
       return;
     }
 
-  session_file = g_file_new_for_path (manager->session_file);
-
-  /* query the file, we need to make sure we can write to it */
-  info = g_file_query_info (session_file,
-                            G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE,
-                            G_FILE_QUERY_INFO_NONE,
-                            NULL,
-                            NULL);
-
-  /* if we're unable to query the file attributes or write to the file,
-   * log the failure and return */
-  if (!info || !g_file_info_get_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE))
-    {
-      fprintf (stderr,
-               "xfce4-session: Unable to save changes to the session file %s"
-               "Please check your installation.\n", manager->session_file);
-
-      if (info)
-        g_object_unref (info);
-
-      xfce_rc_close (rc);
-      g_object_unref (session_file);
-
-      return;
-    }
-
   /* backup the old session file first */
   if (g_file_test (manager->session_file, G_FILE_TEST_IS_REGULAR))
     {
@@ -1772,8 +1744,6 @@ xfsm_manager_store_session (XfsmManager *manager)
 
   xfce_rc_close (rc);
 
-  g_object_unref (session_file);
-
   g_free (manager->checkpoint_session_name);
   manager->checkpoint_session_name = NULL;
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list