mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Fix default folder for the Document link dialogue
When the document link is a relative one, we need to convert that to a absolute path so the file chooser current folder can be set correctly.
This commit is contained in:
parent
75be800151
commit
11ed0b5db1
@ -166,10 +166,12 @@ fcb_clicked_cb (GtkButton *button, GtkWidget *ok_button)
|
|||||||
|
|
||||||
if (uri && *uri)
|
if (uri && *uri)
|
||||||
{
|
{
|
||||||
gchar *full_filename = gnc_uri_get_path (uri);
|
gchar *scheme = gnc_uri_get_scheme (uri);
|
||||||
|
gchar *full_filename = gnc_doclink_get_unescape_uri (path_head, uri, scheme);
|
||||||
gchar *path = g_path_get_dirname (full_filename);
|
gchar *path = g_path_get_dirname (full_filename);
|
||||||
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER(native), path);
|
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER(native), path);
|
||||||
g_free (full_filename);
|
g_free (full_filename);
|
||||||
|
g_free (scheme);
|
||||||
g_free (path);
|
g_free (path);
|
||||||
}
|
}
|
||||||
else if (path_head)
|
else if (path_head)
|
||||||
|
Loading…
Reference in New Issue
Block a user