SF.net SVN: geany:[4007] trunk
ntrel at users.sourceforge.net
ntrel at xxxxx
Tue Jul 21 16:23:05 UTC 2009
Revision: 4007
http://geany.svn.sourceforge.net/geany/?rev=4007&view=rev
Author: ntrel
Date: 2009-07-21 16:23:05 +0000 (Tue, 21 Jul 2009)
Log Message:
-----------
Remove relative/untidy path elements when creating new documents
with a filename (e.g. from the command-line) (#2823998).
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/document.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-07-20 23:12:24 UTC (rev 4006)
+++ trunk/ChangeLog 2009-07-21 16:23:05 UTC (rev 4007)
@@ -1,3 +1,10 @@
+2009-07-21 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
+
+ * src/document.c:
+ Remove relative/untidy path elements when creating new documents
+ with a filename (e.g. from the command-line) (#2823998).
+
+
2009-07-20 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* src/callbacks.c:
Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c 2009-07-20 23:12:24 UTC (rev 4006)
+++ trunk/src/document.c 2009-07-21 16:23:05 UTC (rev 4007)
@@ -684,8 +684,17 @@
GeanyDocument *document_new_file(const gchar *utf8_filename, GeanyFiletype *ft,
const gchar *text)
{
- GeanyDocument *doc = document_create(utf8_filename);
+ GeanyDocument *doc;
+ if (utf8_filename && g_path_is_absolute(utf8_filename))
+ {
+ gchar *tmp;
+ tmp = utils_strdupa(utf8_filename); /* work around const */
+ utils_tidy_path(tmp);
+ utf8_filename = tmp;
+ }
+ doc = document_create(utf8_filename);
+
g_assert(doc != NULL);
sci_set_undo_collection(doc->editor->sci, FALSE); /* avoid creation of an undo action */
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