Kaydet (Commit) d906a779 authored tarafından Nick Treleaven's avatar Nick Treleaven

Remove relative/untidy path elements when creating new documents

with a filename (e.g. from the command-line) (#2823998).



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4007 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst 46ecf706
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:
......
......@@ -684,7 +684,16 @@ GeanyDocument *document_new_file_if_non_open(void)
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment