summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6c77212)
raw | patch | inline | side by side (parent: 6c77212)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Mon, 29 Jun 2009 02:00:29 +0000 (02:00 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Mon, 29 Jun 2009 02:00:29 +0000 (02:00 +0000) |
src/extension/internal/bitmap/imagemagick.cpp | patch | blob | history |
diff --git a/src/extension/internal/bitmap/imagemagick.cpp b/src/extension/internal/bitmap/imagemagick.cpp
index bfde84e0c4182dda059a564587738b939f1552d7..ab2834141fb35b543234247b74eac67e13ab1cd7 100644 (file)
image->read(blob);
}
else {
- if (!strncmp(xlink, "file://", 7) && strlen(xlink) > 7)
- image->read(xlink + 7);
- else
- image->read(xlink);
+ const gchar *path = xlink;
+ if (strncmp (xlink,"file:", 5) == 0) {
+ path = g_filename_from_uri(xlink, NULL, NULL);
+ }
+
+ try {
+ image->read(path);
+ } catch (...) {}
}
}