From 433bde5f59b67c04fdbb82d484e823a2cfd8624c Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Fri, 6 May 2011 21:49:50 -0700 Subject: Fix windows build. (bzr r10199) --- src/xml/rebase-hrefs.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/xml/rebase-hrefs.cpp') 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)); } -- cgit v1.2.3