SF.net SVN: geany:[5348] trunk

ntrel at users.sourceforge.net ntrel at xxxxx
Mon Nov 1 15:17:22 UTC 2010


Revision: 5348
          http://geany.svn.sourceforge.net/geany/?rev=5348&view=rev
Author:   ntrel
Date:     2010-11-01 15:17:22 +0000 (Mon, 01 Nov 2010)

Log Message:
-----------
Remove trailing directory separator for app->datadir and
app->docdir for consistency with the other directory fields.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/main.c
    trunk/src/utils.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2010-11-01 10:57:58 UTC (rev 5347)
+++ trunk/ChangeLog	2010-11-01 15:17:22 UTC (rev 5348)
@@ -1,6 +1,13 @@
+2010-11-01  Nick Treleaven  <nick(dot)treleaven(at)btinternet(dot)com>
+
+ * src/utils.c, src/main.c:
+   Remove trailing directory separator for app->datadir and
+   app->docdir for consistency with the other directory fields.
+
+
 2010-11-01  Frank Lanitz  <frank(at)frank(dot)uvena(dot)de>
 
- * data/filetypes.ada: 
+ * data/filetypes.ada:
    Fix comments for Ada. Thanks to Jonas Baggett for reporting.
 
 

Modified: trunk/src/main.c
===================================================================
--- trunk/src/main.c	2010-11-01 10:57:58 UTC (rev 5347)
+++ trunk/src/main.c	2010-11-01 15:17:22 UTC (rev 5348)
@@ -382,8 +382,8 @@
 
 	g_free(install_dir);
 #else
-	data_dir = g_strconcat(GEANY_DATADIR, "/geany/", NULL); /* e.g. /usr/share/geany */
-	doc_dir = g_strconcat(GEANY_DOCDIR, "/html/", NULL);
+	data_dir = g_strconcat(GEANY_DATADIR, "/geany", NULL); /* e.g. /usr/share/geany */
+	doc_dir = g_strconcat(GEANY_DOCDIR, "/html", NULL);
 #endif
 
 	/* convert path names to locale encoding */
@@ -587,12 +587,6 @@
 }
 
 
-#ifdef G_OS_WIN32
-# define DIR_SEP "\\" /* on Windows we need an additional dir separator */
-#else
-# define DIR_SEP ""
-#endif
-
 static gint create_config_dir(void)
 {
 	gint saved_errno = 0;
@@ -666,7 +660,7 @@
 			gchar *text = g_strconcat(
 "Copy files from ", app->datadir, " to this directory to overwrite "
 "them. To use the defaults, just delete the file in this directory.\nFor more information read "
-"the documentation (in ", app->docdir, DIR_SEP "index.html or visit " GEANY_HOMEPAGE ").", NULL);
+"the documentation (in ", app->docdir, G_DIR_SEPARATOR_S "index.html or visit " GEANY_HOMEPAGE ").", NULL);
 			utils_write_file(filedefs_readme, text);
 			g_free(text);
 		}
@@ -687,7 +681,7 @@
 		{
 			gchar *text = g_strconcat(
 "There are several template files in this directory. For these templates you can use wildcards.\n\
-For more information read the documentation (in ", app->docdir, DIR_SEP "index.html or visit " GEANY_HOMEPAGE ").",
+For more information read the documentation (in ", app->docdir, G_DIR_SEPARATOR_S "index.html or visit " GEANY_HOMEPAGE ").",
 					NULL);
 			utils_write_file(templates_readme, text);
 			g_free(text);

Modified: trunk/src/utils.c
===================================================================
--- trunk/src/utils.c	2010-11-01 10:57:58 UTC (rev 5347)
+++ trunk/src/utils.c	2010-11-01 15:17:22 UTC (rev 5348)
@@ -1948,7 +1948,7 @@
 	g_strdelimit(uri, "\\", '/'); /* replace '\\' by '/' */
 #else
 	skip = 7;
-	uri = g_strconcat("file://", app->docdir, "index.html", NULL);
+	uri = g_strconcat("file://", app->docdir, "/index.html", NULL);
 #endif
 
 	if (! g_file_test(uri + skip, G_FILE_TEST_IS_REGULAR))


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