diff options
| author | Nicolas Dufour <nicoduf@yahoo.fr> | 2009-06-12 12:45:35 +0000 |
|---|---|---|
| committer | JazzyNico <JazzyNico@users.sourceforge.net> | 2009-06-12 12:45:35 +0000 |
| commit | ae64840f0cd6723b1b6870a71176c0de51d36ec4 (patch) | |
| tree | 2cccd9ff48ee4f986eb52a8e83d4c16dc22c3dd9 /share | |
| parent | Renaming Alpha paint to Alpha draw, color and solving an inconsistency betwee... (diff) | |
| download | inkscape-ae64840f0cd6723b1b6870a71176c0de51d36ec4.tar.gz inkscape-ae64840f0cd6723b1b6870a71176c0de51d36ec4.zip | |
embedimage.py patch for Bug #386069
(bzr r8062)
Diffstat (limited to 'share')
| -rw-r--r-- | share/extensions/embedimage.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/share/extensions/embedimage.py b/share/extensions/embedimage.py index 93472b325..a6cef5363 100644 --- a/share/extensions/embedimage.py +++ b/share/extensions/embedimage.py @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ''' -import inkex, os, base64 +import inkex, os, base64, urlparse import gettext _ = gettext.gettext @@ -55,17 +55,15 @@ class Embedder(inkex.Effect): xlink = node.get(inkex.addNS('href','xlink')) if xlink is None or xlink[:5] != 'data:': absref=node.get(inkex.addNS('absref','sodipodi')) - href=xlink + url=urlparse.urlparse(xlink) + href=url.path path='' #path selection strategy: # 1. href if absolute # 2. realpath-ified href # 3. absref, only if the above does not point to a file if (href != None): - if (os.path.isabs(href)): - path=os.path.realpath(href) - else: - path=os.path.realpath(href) + path=os.path.realpath(href) if (not os.path.isfile(path)): if (absref != None): path=absref |
