Update of /cvsroot/boost/boost/tools/inspect
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv31242/tools/inspect

Modified Files:
        inspector.hpp 
Log Message:
Fix relative path calculation so that it doesn't throw when paths go above the 
boost root.

Index: inspector.hpp
===================================================================
RCS file: /cvsroot/boost/boost/tools/inspect/inspector.hpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- inspector.hpp       20 Jul 2004 04:31:53 -0000      1.5
+++ inspector.hpp       15 Jul 2006 20:26:58 -0000      1.6
@@ -78,13 +78,12 @@
 
     inline string relative_to( const path & src_arg, const path & base_arg )
     {
-      path src( src_arg );
-      src.normalize();
       path base( base_arg );
       base.normalize();
       string::size_type pos( base.string().size() );
-      return src.string().substr(
-        pos + ( pos < src.string().size() ? 1 : 0 ) );
+      path src( src_arg.string().substr(pos) );
+      src.normalize();
+      return src.string().substr(1);
     }
 
     string impute_library( const path & full_dir_path );



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs

Reply via email to