[Cmake-commits] CMake branch, master, updated. v2.8.3-216-g3a14b6e
KWSys Robot
kwrobot at kitware.com
Tue Dec 14 18:13:04 EST 2010
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, master has been updated
via 3a14b6e5561feb33225d61fd2897d79c2779809b (commit)
from 2d1aa4ad06eedf6bc677c8ebf757f4978a839e02 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3a14b6e5561feb33225d61fd2897d79c2779809b
commit 3a14b6e5561feb33225d61fd2897d79c2779809b
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Dec 14 18:12:28 2010 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Dec 14 18:13:03 2010 -0500
KWSys: Do not mangle UNC paths in ConvertToUnixOutputPath (#10206)
This method replaces '//' with '/' to make the paths look nicer.
Originally it correctly skipped a leading '//' in a UNC path as the
comment says. However, commit "Removed extra variable initializations"
(2005-04-15) accidentally removed the "pos=1" initializer. It was then
incorrectly restored by commit "Added missing variable initialization"
(2005-04-15) as just "pos=0". Restore the proper initializer.
The test for this added by commit "better coverage" (2006-07-31)
included incorrect output for a sample UNC-like path. Fix it.
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx
index 7638e4a..60d6869 100644
--- a/Source/kwsys/SystemTools.cxx
+++ b/Source/kwsys/SystemTools.cxx
@@ -1640,7 +1640,7 @@ kwsys_stl::string SystemTools::ConvertToUnixOutputPath(const char* path)
kwsys_stl::string ret = path;
// remove // except at the beginning might be a cygwin drive
- kwsys_stl::string::size_type pos=0;
+ kwsys_stl::string::size_type pos=1;
while((pos = ret.find("//", pos)) != kwsys_stl::string::npos)
{
ret.erase(pos, 1);
diff --git a/Source/kwsys/testSystemTools.cxx b/Source/kwsys/testSystemTools.cxx
index ad35c34..c0e74af 100644
--- a/Source/kwsys/testSystemTools.cxx
+++ b/Source/kwsys/testSystemTools.cxx
@@ -297,7 +297,7 @@ bool CheckStringOperations()
if (kwsys::SystemTools::ConvertToUnixOutputPath
("//Local Mojo/Hex Power Pack/Iffy Voodoo") !=
- "/Local\\ Mojo/Hex\\ Power\\ Pack/Iffy\\ Voodoo")
+ "//Local\\ Mojo/Hex\\ Power\\ Pack/Iffy\\ Voodoo")
{
kwsys_ios::cerr
<< "Problem with ConvertToUnixOutputPath "
-----------------------------------------------------------------------
Summary of changes:
Source/kwsys/SystemTools.cxx | 2 +-
Source/kwsys/testSystemTools.cxx | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list