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
This commit is contained in:
parent
46ecf7061d
commit
d906a77975
@ -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:
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user