• R/O
  • SSH
  • HTTPS

tortoisesvn: Commit


Commit MetaInfo

Revision29259 (tree)
Zeit2021-09-15 01:07:34
Autorstefankueng

Log Message

only unregister if a package is found. If it's not found that's not an error.

Ändern Zusammenfassung

Diff

--- trunk/src/TortoiseSVNSetup/CustomActions/CustomActions11.cpp (revision 29258)
+++ trunk/src/TortoiseSVNSetup/CustomActions/CustomActions11.cpp (revision 29259)
@@ -34,7 +34,6 @@
3434 using namespace winrt::Windows::Foundation;
3535 using namespace winrt::Windows::Management::Deployment;
3636
37-
3837 BOOL APIENTRY DllMain(HANDLE /*hModule*/,
3938 DWORD /*ul_reason_for_call*/,
4039 LPVOID /*lpReserved*/
@@ -93,16 +92,17 @@
9392 for (const auto& package : packages)
9493 {
9594 if (package.Id().Name() == sparsePackageName.get())
96- fullName = package.Id().FullName();
95+ {
96+ fullName = package.Id().FullName();
97+ auto deploymentOperation = packageManager.RemovePackageAsync(fullName, RemovalOptions::None);
98+ auto deployResult = deploymentOperation.get();
99+ if (!SUCCEEDED(deployResult.ExtendedErrorCode()))
100+ {
101+ // Deployment failed
102+ return deployResult.ExtendedErrorCode();
103+ }
104+ }
97105 }
98106
99- auto deploymentOperation = packageManager.RemovePackageAsync(fullName, RemovalOptions::None);
100- auto deployResult = deploymentOperation.get();
101- if (!SUCCEEDED(deployResult.ExtendedErrorCode()))
102- {
103- // Deployment failed
104- return deployResult.ExtendedErrorCode();
105- }
106-
107107 return ERROR_SUCCESS;
108108 }
\ No newline at end of file
Show on old repository browser