SF.net SVN: geany:[3389] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Wed Dec 17 15:58:59 UTC 2008


Revision: 3389
          http://geany.svn.sourceforge.net/geany/?rev=3389&view=rev
Author:   eht16
Date:     2008-12-17 15:58:59 +0000 (Wed, 17 Dec 2008)

Log Message:
-----------
Fix broken session file support on Windows (oops).

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/keyfile.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2008-12-16 17:11:09 UTC (rev 3388)
+++ trunk/ChangeLog	2008-12-17 15:58:59 UTC (rev 3389)
@@ -1,3 +1,9 @@
+ 2008-12-17  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>
+
+  * src/keyfile.c:
+    Fix broken session file support on Windows.
+
+
 2008-12-16  Nick Treleaven  <nick(dot)treleaven(at)btinternet(dot)com>
 
  * src/keyfile.c, src/keyfile.h, src/search.c, src/main.c:

Modified: trunk/src/keyfile.c
===================================================================
--- trunk/src/keyfile.c	2008-12-16 17:11:09 UTC (rev 3388)
+++ trunk/src/keyfile.c	2008-12-17 15:58:59 UTC (rev 3389)
@@ -228,8 +228,9 @@
 	/* If the filename contains any ';' (semi-colons) we need to escape them otherwise
 	 * g_key_file_get_string_list() would fail reading them, so we replace them before
 	 * writing with usual colons which must never appear in a filename and replace them
-	 * back when we read the file again from the file. */
-	g_strdelimit(doc_filename, ";", ':');
+	 * back when we read the file again from the file.
+	 * (g_path_skip_root() to skip C:\... on Windows) */
+	g_strdelimit((gchar *) g_path_skip_root(doc_filename), ";", ':');
 
 	fname = g_strdup_printf("%d;%s;%d;%d;%d;%d;%d;%s;%d",
 		sci_get_current_position(doc->editor->sci),
@@ -909,7 +910,7 @@
 	/* try to get the locale equivalent for the filename */
 	locale_filename = utils_get_locale_from_utf8(tmp[7]);
 	/* replace ':' back with ';' (see get_session_file_string for details) */
-	g_strdelimit(locale_filename, ":", ';');
+	g_strdelimit((gchar *) g_path_skip_root(locale_filename), ":", ';');
 	if (len > 8)
 		line_breaking = atoi(tmp[8]);
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list