[Goodies-commits] r5103 - in xfce4-screenshooter-plugin/trunk: . src

Jerome Guelfucci jeromeg at xfce.org
Wed Jul 16 09:17:23 CEST 2008


Author: jeromeg
Date: 2008-07-16 07:17:23 +0000 (Wed, 16 Jul 2008)
New Revision: 5103

Modified:
   xfce4-screenshooter-plugin/trunk/ChangeLog
   xfce4-screenshooter-plugin/trunk/src/main.c
Log:
Partially fix -s switch with relative paths

Modified: xfce4-screenshooter-plugin/trunk/ChangeLog
===================================================================
--- xfce4-screenshooter-plugin/trunk/ChangeLog	2008-07-15 20:53:14 UTC (rev 5102)
+++ xfce4-screenshooter-plugin/trunk/ChangeLog	2008-07-16 07:17:23 UTC (rev 5103)
@@ -1,6 +1,11 @@
+2008-07-16 jeromeg
+
+  * src/main.c: partially fix -s switch when using relative path. An obscure
+    warning "Error stating file..." is still shown but it should work fine.
+
 2008-07-15 jeromeg
 
-  * srx/main.c: revert one of the last change which does not work.
+  * src/main.c: revert one of the last change which does not work.
 
 2008-07-15 jeromeg
 

Modified: xfce4-screenshooter-plugin/trunk/src/main.c
===================================================================
--- xfce4-screenshooter-plugin/trunk/src/main.c	2008-07-15 20:53:14 UTC (rev 5102)
+++ xfce4-screenshooter-plugin/trunk/src/main.c	2008-07-16 07:17:23 UTC (rev 5103)
@@ -126,7 +126,15 @@
   
   if ( g_file_test (screenshot_dir, G_FILE_TEST_IS_DIR) )
   {
-    sd->screenshot_dir = screenshot_dir;
+    if ( g_path_is_absolute ( screenshot_dir ) )
+    { 
+      sd->screenshot_dir = screenshot_dir;
+    }
+    else
+    {
+      screenshot_dir = g_build_filename(g_get_current_dir(), screenshot_dir);
+      sd->screenshot_dir = screenshot_dir;
+    }
   }
   else
   {




More information about the Goodies-commits mailing list