Patch: Backing up Keyring



This was a moderately annoying bug, but annoying enough to warrant a few
minutes of fixing. When backing up the keyring with the gconf schema
installed, there is an additional period in the file extension inserted,
e.g...

BackupKeyRing..tar.bz2

This doesn't happen when the schema is not installed and zip is used as
the default file extension.

Anywho, I've attached a patch to be applied against svn HEAD (revision
2034 at time of writing).

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com
Index: libseahorse/seahorse-util.c
===================================================================
--- libseahorse/seahorse-util.c	(revision 2034)
+++ libseahorse/seahorse-util.c	(working copy)
@@ -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 */

Attachment: signature.asc
Description: This is a digitally signed message part



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