[gnome-commander/ConvertWarningsToErrors] Use return value of chdir function



commit e4db035ab3555ad2981d788b22b1ce24535192a3
Author: Uwe Scholz <uwescholz src gnome org>
Date:   Sat Apr 22 16:30:59 2017 +0200

    Use return value of chdir function

 src/gnome-cmd-con-device.cc |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/gnome-cmd-con-device.cc b/src/gnome-cmd-con-device.cc
index ee3f910..ef1cece 100644
--- a/src/gnome-cmd-con-device.cc
+++ b/src/gnome-cmd-con-device.cc
@@ -225,7 +225,10 @@ static gboolean dev_close (GnomeCmdCon *con)
 
     gnome_cmd_con_set_default_dir (con, NULL);
 
-    chdir (g_get_home_dir ());
+    if (chdir (g_get_home_dir ()) == -1)
+    {
+        DEBUG ('m', "Could not go back to home directory before unmounting\n");
+    }
 
     if (dev_con->priv->autovolume)
     {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]