r16184 - gnucash/trunk/lib/libqof/backend/file - Avoid stripping the win drive letter on qsf export. Fixes #448900.

Andreas Köhler andi5 at cvs.gnucash.org
Mon Jun 18 17:08:31 EDT 2007


Author: andi5
Date: 2007-06-18 17:08:30 -0400 (Mon, 18 Jun 2007)
New Revision: 16184
Trac: http://svn.gnucash.org/trac/changeset/16184

Modified:
   gnucash/trunk/lib/libqof/backend/file/qsf-backend.c
Log:
Avoid stripping the win drive letter on qsf export.  Fixes #448900.


Modified: gnucash/trunk/lib/libqof/backend/file/qsf-backend.c
===================================================================
--- gnucash/trunk/lib/libqof/backend/file/qsf-backend.c	2007-06-18 20:42:36 UTC (rev 16183)
+++ gnucash/trunk/lib/libqof/backend/file/qsf-backend.c	2007-06-18 21:08:30 UTC (rev 16184)
@@ -235,19 +235,11 @@
 		qof_backend_set_error(be, ERR_BACKEND_NO_ERR);
 		return;
 	}
-	p = strchr (book_path, ':');
-	if (p) {
-		path = g_strdup (book_path);
-		if (!g_ascii_strncasecmp(path, "file:", 5)) {
-			p = g_new(gchar, strlen(path) - 5 + 1);
-			strcpy(p, path + 5);
-		}
-		qsf_be->fullpath = g_strdup(p);
-		g_free (path);
+	if (g_str_has_prefix (book_path, "file:")) {
+		qsf_be->fullpath = g_strdup (book_path + 5);
+	} else {
+		qsf_be->fullpath = g_strdup (book_path);
 	}
-	else {
-		qsf_be->fullpath = g_strdup(book_path);
-	}
 	if(create_if_nonexistent)
 	{
         FILE *f;



More information about the gnucash-changes mailing list