summaryrefslogtreecommitdiffstats
path: root/src/selection-chemistry.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2011-07-19 23:01:23 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2011-07-19 23:01:23 +0000
commite24a1e86c4d4cdf272e3ec0cd33b31bf2d59244c (patch)
tree62450c2f83b031d06fa58a74d1816374cd48e0e1 /src/selection-chemistry.cpp
parentAdd two new snap icons, and fix toggling bug for a single button (diff)
downloadinkscape-e24a1e86c4d4cdf272e3ec0cd33b31bf2d59244c.tar.gz
inkscape-e24a1e86c4d4cdf272e3ec0cd33b31bf2d59244c.zip
Remove deprecated Glib symbols
Fixed bugs: - https://launchpad.net/bugs/367606 (bzr r10480)
Diffstat (limited to 'src/selection-chemistry.cpp')
-rw-r--r--src/selection-chemistry.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp
index df3eaa388..23991bfb6 100644
--- a/src/selection-chemistry.cpp
+++ b/src/selection-chemistry.cpp
@@ -2691,14 +2691,15 @@ void sp_selection_create_bitmap_copy(SPDesktop *desktop)
g_strcanon(basename, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.=+~$#@^&!?", '_');
// Build the complete path by adding document base dir, if set, otherwise home dir
- gchar * directory = NULL;
+ gchar *directory = NULL;
if ( document->getURI() ) {
- directory = g_dirname( document->getURI() );
+ directory = g_path_get_dirname( document->getURI() );
}
if (directory == NULL) {
directory = homedir_path(NULL);
}
gchar *filepath = g_build_filename(directory, basename, NULL);
+ g_free(directory);
//g_print("%s\n", filepath);