seahorse r2037 - in trunk: . libseahorse



Author: sadam
Date: Mon Jan 21 04:16:13 2008
New Revision: 2037
URL: http://svn.gnome.org/viewvc/seahorse?rev=2037&view=rev

Log:
2008-01-20  Adam Schreiber  <sadam clemson edu>

    * libseahorse/seahorse-util.c: Don't add an extra 'dot' to file names 
unless
    necessary.  Patch from Kip Warner.  Fixes bug #510928


Modified:
   trunk/ChangeLog
   trunk/libseahorse/seahorse-util.c

Modified: trunk/libseahorse/seahorse-util.c
==============================================================================
--- trunk/libseahorse/seahorse-util.c	(original)
+++ trunk/libseahorse/seahorse-util.c	Mon Jan 21 04:16:13 2008
@@ -587,9 +587,14 @@
             *dot = 0;
     }
  
-    strcat (ret, ".");
+    /* Only begin extension with . if provided extension doesn't start with
+       one already. */
+    if(ext[0] != '.')
+        strcat (ret, ".");
+
+    /* Finally append the caller's provided extension. */
     strcat (ret, ext);
-    return ret;    
+    return ret;
 }
 
 /* Context for callback below */



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