Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv31410/src/libopenvrml/openvrml
Modified Files:
Tag: OpenVRML-0_16-BRANCH
browser.cpp
Log Message:
If the relative URI begins with "/", it is a relative URI that consists of an absolute path; prepend "file://" and return.
Index: browser.cpp
===================================================================
RCS file: /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml/browser.cpp,v
retrieving revision 1.190.2.9
retrieving revision 1.190.2.10
diff -C2 -d -r1.190.2.9 -r1.190.2.10
*** browser.cpp 3 Feb 2007 08:22:24 -0000 1.190.2.9
--- browser.cpp 24 Feb 2007 07:38:58 -0000 1.190.2.10
***************
*** 3539,3542 ****
--- 3539,3549 ----
base_uri << "file://";
+ const string relative_path = relative_uri.path();
+
+ if (!relative_path.empty() && relative_path[0] == '/') {
+ base_uri << relative_path;
+ return uri(base_uri.str());
+ }
+
# ifdef _WIN32
std::vector<char> cwd_buf(_MAX_PATH);
***************
*** 7220,7224 ****
: test_uri
.resolve_against(uri(this->url()));
-
try {
in = this->browser().get_resource(absolute_uri);
--- 7227,7230 ----
|