summaryrefslogtreecommitdiff
path: root/setup_native
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-03-04 09:28:31 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-03-04 13:07:40 +0000
commit32f95a35514701ed16413125b440c16d90f52b4a (patch)
tree25ac5edca15ee02bc937ee47116c2197559da4cd /setup_native
parent0f98299f7aa44bbb55c1bfeddca7799f727d14b0 (diff)
V813: Decreased performance
Change-Id: I8a7528366156b288dc422b09cff0d5a32cde3c91
Diffstat (limited to 'setup_native')
-rw-r--r--setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx13
1 files changed, 5 insertions, 8 deletions
diff --git a/setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx b/setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx
index ab039e2c48fe..162d54d0969d 100644
--- a/setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx
+++ b/setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx
@@ -63,7 +63,6 @@ static inline void OutputDebugStringFormat( LPCSTR, ... )
}
#endif
-
static std::_tstring GetMsiProperty( MSIHANDLE handle, const std::_tstring& sProperty )
{
std::_tstring result;
@@ -82,14 +81,14 @@ static std::_tstring GetMsiProperty( MSIHANDLE handle, const std::_tstring& sPro
return result;
}
-static BOOL RemoveCompleteDirectory( std::_tstring sPath )
+static BOOL RemoveCompleteDirectory(const std::_tstring& rPath)
{
bool bDirectoryRemoved = true;
- std::_tstring sPattern = sPath + TEXT("\\") + TEXT("*.*");
+ std::_tstring sPattern = rPath + TEXT("\\") + TEXT("*.*");
WIN32_FIND_DATA aFindData;
- // Finding all content in sPath
+ // Finding all content in rPath
HANDLE hFindContent = FindFirstFile( sPattern.c_str(), &aFindData );
@@ -106,7 +105,7 @@ static BOOL RemoveCompleteDirectory( std::_tstring sPath )
if (( strcmp(sFileName.c_str(),sCurrentDir.c_str()) != 0 ) &&
( strcmp(sFileName.c_str(),sParentDir.c_str()) != 0 ))
{
- std::_tstring sCompleteFileName = sPath + TEXT("\\") + sFileName;
+ std::_tstring sCompleteFileName = rPath + TEXT("\\") + sFileName;
if ( aFindData.dwFileAttributes == FILE_ATTRIBUTE_DIRECTORY )
{
@@ -129,7 +128,7 @@ static BOOL RemoveCompleteDirectory( std::_tstring sPath )
// -> first removing content -> closing handle -> remove empty directory
- if( !( RemoveDirectory(sPath.c_str()) ) )
+ if( !( RemoveDirectory(rPath.c_str()) ) )
{
bDirectoryRemoved = false;
}
@@ -138,8 +137,6 @@ static BOOL RemoveCompleteDirectory( std::_tstring sPath )
return bDirectoryRemoved;
}
-
-
extern "C" UINT __stdcall RenamePrgFolder( MSIHANDLE handle )
{
std::_tstring sOfficeInstallPath = GetMsiProperty(handle, TEXT("INSTALLLOCATION"));