[Wine-patches] [eterhack] Revert "msi: Remove empty directories after removing files (eterbug #953) (new version)."

Alexander Morozov amorozov на etersoft.ru
Чт Июл 21 21:39:54 MSD 2011


----------- следующая часть -----------
From 9e97579e692e6bf28b897044a3a81dbbd11d70e6 Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov на etersoft.ru>
Date: Thu, 21 Jul 2011 21:34:53 +0400
Subject: [eterhack] Revert "msi: Remove empty directories after removing
 files (eterbug #953) (new version)."

This reverts commit 06fa6b5a6ec33254a4bc4e287e55103081544e7b.

Conflicts:

	dlls/msi/action.c
	dlls/msi/msipriv.h
	dlls/msi/tests/install.c
---
 dlls/msi/action.c  |   71 ----------------------------------------------------
 dlls/msi/files.c   |    2 -
 dlls/msi/msipriv.h |    2 -
 3 files changed, 0 insertions(+), 75 deletions(-)

diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index 65207dc..a654a38 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -882,77 +882,6 @@ static UINT ITERATE_CreateFolders(MSIRECORD *row, LPVOID param)
     return ERROR_SUCCESS;
 }
 
-/* FIXME: probably should merge this with the above function */
-static UINT msi_create_directory( MSIPACKAGE* package, LPCWSTR dir )
-{
-    UINT rc = ERROR_SUCCESS;
-    MSIFOLDER *folder;
-    LPWSTR install_path;
-
-    install_path = msi_get_target_folder(package, dir);
-    if (!install_path)
-        return ERROR_FUNCTION_FAILED; 
-
-    /* create the path */
-    if (folder->State == 0)
-    {
-        msi_create_full_path(install_path);
-        folder->State = 2;
-    }
-    msi_free(install_path);
-
-    return rc;
-}
-
-UINT msi_create_component_directories( MSIPACKAGE *package )
-{
-    MSICOMPONENT *comp;
-
-    /* create all the folders required by the components are going to install */
-    LIST_FOR_EACH_ENTRY( comp, &package->components, MSICOMPONENT, entry )
-    {
-        if (comp->ActionRequest != INSTALLSTATE_LOCAL)
-            continue;
-        msi_create_directory( package, comp->Directory );
-    }
-
-    return ERROR_SUCCESS;
-}
-
-static UINT msi_remove_directory( MSIPACKAGE* package, LPCWSTR dir )
-{
-    UINT rc = ERROR_SUCCESS;
-    MSIFOLDER *folder;
-    LPWSTR install_path;
-
-    install_path = msi_get_target_folder(package, dir);
-    if (!install_path)
-        return ERROR_FUNCTION_FAILED;
-
-    if (folder->State != 3 && RemoveDirectoryW(install_path))
-    {
-        folder->State = 0;
-        msi_remove_directory(package, folder->Parent);
-    }
-    msi_free(install_path);
-
-    return rc;
-}
-
-UINT msi_remove_component_directories( MSIPACKAGE *package )
-{
-    MSICOMPONENT *comp;
-
-    LIST_FOR_EACH_ENTRY( comp, &package->components, MSICOMPONENT, entry )
-    {
-        if (comp->ActionRequest != INSTALLSTATE_LOCAL)
-            continue;
-        msi_remove_directory( package, comp->Directory );
-    }
-
-    return ERROR_SUCCESS;
-}
-
 /*
  * Also we cannot enable/disable components either, so for now I am just going 
  * to do all the directories for all the components.
diff --git a/dlls/msi/files.c b/dlls/msi/files.c
index 28050ab..8b2feb9 100644
--- a/dlls/msi/files.c
+++ b/dlls/msi/files.c
@@ -1318,7 +1318,5 @@ UINT ACTION_RemoveFiles( MSIPACKAGE *package )
         /* FIXME: call msi_ui_progress here? */
     }
 
-    msi_remove_component_directories( package );
-
     return ERROR_SUCCESS;
 }
diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h
index 46d6997..ab53113 100644
--- a/dlls/msi/msipriv.h
+++ b/dlls/msi/msipriv.h
@@ -1002,8 +1002,6 @@ extern void ACTION_UpdateComponentStates(MSIPACKAGE *package, MSIFEATURE *featur
 extern UINT msi_register_unique_action(MSIPACKAGE *, const WCHAR *) DECLSPEC_HIDDEN;
 extern BOOL msi_action_is_unique(const MSIPACKAGE *, const WCHAR *) DECLSPEC_HIDDEN;
 extern WCHAR *msi_build_error_string(MSIPACKAGE *, UINT, DWORD, ...) DECLSPEC_HIDDEN;
-extern UINT msi_create_component_directories( MSIPACKAGE *package );
-extern UINT msi_remove_component_directories( MSIPACKAGE *package );
 extern UINT msi_set_last_used_source(LPCWSTR product, LPCWSTR usersid,
                         MSIINSTALLCONTEXT context, DWORD options, LPCWSTR value) DECLSPEC_HIDDEN;
 extern UINT msi_get_local_package_name(LPWSTR path, LPCWSTR suffix) DECLSPEC_HIDDEN;
-- 
1.7.5.4



Подробная информация о списке рассылки Wine-patches