This is a perfect example why file and resource locations need to be stored
as URIs rather than plain strings. URI's resolve() method would do this in
a simple, W3-spec'd way:
real_path = svgfileURI.resolve(bitmapURI);
This would handle the difference between absolute and relative,
since the algorithm deals with them in a consistent manner.
On 10/28/2008 8:26 PM, Jon A. Cruz wrote:
> On Oct 28, 2008, at 1:29 PM, William Swanson wrote:
>> I've uploaded a small patch which fixes Launchpad bugs #168715 and
>> #171869. The patch makes Inkscape treat paths in the Bitmap Export
>> dialog relative to the document's location rather than the current
>> working directory. This allows the user to enter paths like
>> "../css/bitmap.png" and have them work as expected. The patch is here:
>> Would anybody like to review and commit it?
> Sounds good.
> I'll take a look