Update of /cvsroot/openvrml/openvrml/src/libopenvrml/openvrml
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv31667/src/libopenvrml/openvrml
Modified Files:
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.203
retrieving revision 1.204
diff -C2 -d -r1.203 -r1.204
*** browser.cpp 3 Feb 2007 08:22:39 -0000 1.203
--- browser.cpp 24 Feb 2007 07:39:11 -0000 1.204
***************
*** 3542,3545 ****
--- 3542,3552 ----
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);
***************
*** 7258,7262 ****
: test_uri
.resolve_against(uri(this->url()));
-
try {
in = this->browser().fetcher_.get_resource(absolute_uri);
--- 7265,7268 ----
|