diff options
| author | Bob Jamison <ishmalius@gmail.com> | 2006-04-22 23:13:25 +0000 |
|---|---|---|
| committer | ishmal <ishmal@users.sourceforge.net> | 2006-04-22 23:13:25 +0000 |
| commit | da8c608390f1ae88ec68c2c9c8e43a5dac5611b5 (patch) | |
| tree | bebc746bd6c1ae90838754df672d023d87a554c5 /src | |
| parent | Native paths and relative path resolution (diff) | |
| download | inkscape-da8c608390f1ae88ec68c2c9c8e43a5dac5611b5.tar.gz inkscape-da8c608390f1ae88ec68c2c9c8e43a5dac5611b5.zip | |
Native path support
(bzr r576)
Diffstat (limited to 'src')
| -rw-r--r-- | src/dom/io/uristream.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/dom/io/uristream.cpp b/src/dom/io/uristream.cpp index a12fe9522..1cc540bd5 100644 --- a/src/dom/io/uristream.cpp +++ b/src/dom/io/uristream.cpp @@ -77,20 +77,17 @@ void UriInputStream::init() throw (StreamException) //get information from uri scheme = uri.getScheme(); - //printf("in scheme:'%d'\n", scheme); - DOMString path = uri.getPath(); - //printf("in path:'%s'\n", path.c_str()); - switch (scheme) { case URI::SCHEME_FILE: { - inf = fopen(path.c_str(), "rb"); + DOMString npath = uri.getNativePath(); + inf = fopen(npath.c_str(), "rb"); if (!inf) { DOMString err = "UriInputStream cannot open file "; - err.append(path); + err.append(npath); throw StreamException(err); } break; @@ -98,6 +95,7 @@ void UriInputStream::init() throw (StreamException) case URI::SCHEME_DATA: { + DOMString path = uri.getPath(); data = (unsigned char *) uri.getPath().c_str(); //printf("in data:'%s'\n", data); dataPos = 0; @@ -317,7 +315,7 @@ void UriOutputStream::init() throw(StreamException) case URI::SCHEME_FILE: { - cpath = (char *) uri.getPath().c_str(); + cpath = (char *) uri.getNativePath().c_str(); //printf("out path:'%s'\n", cpath); outf = fopen(cpath, "wb"); if (!outf) |
