diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2011-05-07 04:49:50 +0000 |
|---|---|---|
| committer | Jon A. Cruz <jon@joncruz.org> | 2011-05-07 04:49:50 +0000 |
| commit | 433bde5f59b67c04fdbb82d484e823a2cfd8624c (patch) | |
| tree | 2ceac8e4ccc80bdf0ab9bc00a309e382a6f5cbea /src | |
| parent | Adding initial cut of resource manager. (diff) | |
| download | inkscape-433bde5f59b67c04fdbb82d484e823a2cfd8624c.tar.gz inkscape-433bde5f59b67c04fdbb82d484e823a2cfd8624c.zip | |
Fix windows build.
(bzr r10199)
Diffstat (limited to 'src')
| -rw-r--r-- | src/xml/rebase-hrefs.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/xml/rebase-hrefs.cpp b/src/xml/rebase-hrefs.cpp index 71e1cfb87..4a7e050fa 100644 --- a/src/xml/rebase-hrefs.cpp +++ b/src/xml/rebase-hrefs.cpp @@ -252,8 +252,8 @@ void Inkscape::XML::rebase_hrefs(SPDocument *const doc, gchar const *const new_b #ifdef WIN32 /* Windows relative path needs their native separators before we * compare it to native baserefs. */ - if (!g_path_is_absolute(href)) { - g_strdelimit(href, "/", '\\'); + if ( !Glib::path_is_absolute(href) ) { + std::replace(href.begin(), href.end(), '/', '\\'); } #endif @@ -281,10 +281,9 @@ void Inkscape::XML::rebase_hrefs(SPDocument *const doc, gchar const *const new_b #ifdef WIN32 /* Native Windows path separators are replaced with / so that the href * also works on Gnu/Linux and OSX */ - ir->setAttribute("xlink:href", g_strdelimit(new_href.c_str(), "\\", '/')); -#else - ir->setAttribute("xlink:href", new_href.c_str()); + std::replace(href.begin(), href.end(), '\\', '/'); #endif + ir->setAttribute("xlink:href", new_href.c_str()); } else { ir->setAttribute("xlink:href", g_filename_to_uri(new_href.c_str(), NULL, NULL)); } |
