secureswitools/swisistools/source/interpretsislib/adornedutilities.cpp
branchRCL_3
changeset 24 5cc91383ab1e
parent 0 ba25891c3a9e
--- a/secureswitools/swisistools/source/interpretsislib/adornedutilities.cpp	Thu Jul 15 18:47:04 2010 +0300
+++ b/secureswitools/swisistools/source/interpretsislib/adornedutilities.cpp	Thu Aug 19 10:02:49 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -56,7 +56,11 @@
 	}
 }
 
+#ifndef __TOOLS2_LINUX__
 bool IsAdornedVariationOf(const std::wstring& aFileName1, const std::wstring& aFileName2)
+#else
+bool IsAdornedVariationOf(const std::wstring& aFileName1, const std::wstring& aFileName2, const std::wstring& aDrivePath)
+#endif
 {
 	std::wstring unadornedFileName1;
 	GetUnadornedFileName(aFileName1,unadornedFileName1);
@@ -64,6 +68,11 @@
 	std::wstring unadornedFileName2;
 	GetUnadornedFileName(aFileName2,unadornedFileName2);
 
+	#ifdef __TOOLS2_LINUX__
+	ConvertToLocalPath( unadornedFileName1, aDrivePath );
+	ConvertToLocalPath( unadornedFileName2, aDrivePath );
+	#endif
+
   	// Check whether filename2 is a variant of filename1
   	// e.g: d:\sys\bin\DummyDll{000A0001}.dll is considered a variant of c:\sys\bin\DummyDll.dll 
   	// because they both break down to \sys\bin\DummyDll.dll
@@ -73,7 +82,7 @@
 	std::wstring fileName2Path(StringUtils::Path(unadornedFileName2));
 	std::wstring fileName2NameAndExt(StringUtils::NameAndExt(unadornedFileName2));
 
-	return ((fileName1Path == fileName2Path) && (fileName1NameAndExt == fileName2NameAndExt));
+	return ( !wcscmp(fileName1Path.c_str(), fileName2Path.c_str()) && !wcscmp(fileName1NameAndExt.c_str(), fileName2NameAndExt.c_str()) );
 }
 	
 void FindAllAdornedVariants(const std::wstring& aSearchNameWild, const std::wstring& aSearchPath, std::list<std::wstring>& aAdornedFileNamesFound, const DrivesMap& aDriveMap)