You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Rebase against 975d0632a19efd41338cb73a97f1b0bdbe7bc0cc.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
From c3a3329a62b2d113101a507620927a64f158388f Mon Sep 17 00:00:00 2001
|
||||
From c89e6c48e313c0de0749a4526c677491764845d3 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Tue, 24 Feb 2015 04:25:29 +0100
|
||||
Subject: [PATCH] shell32: Correct indentation in shfileop.c.
|
||||
@ -8,10 +8,10 @@ Subject: [PATCH] shell32: Correct indentation in shfileop.c.
|
||||
1 file changed, 329 insertions(+), 331 deletions(-)
|
||||
|
||||
diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c
|
||||
index 941dba725cd..7b5339acc92 100644
|
||||
index 807b999d957..f0cadc67f8f 100644
|
||||
--- a/dlls/shell32/shlfileop.c
|
||||
+++ b/dlls/shell32/shlfileop.c
|
||||
@@ -210,108 +210,107 @@ static int SHELL_ConfirmMsgBox(HWND hWnd, LPWSTR lpszText, LPWSTR lpszCaption, H
|
||||
@@ -201,108 +201,107 @@ static int SHELL_ConfirmMsgBox(HWND hWnd, LPWSTR lpszText, LPWSTR lpszCaption, H
|
||||
/* confirmation dialogs content */
|
||||
typedef struct
|
||||
{
|
||||
@ -208,7 +208,7 @@ index 941dba725cd..7b5339acc92 100644
|
||||
}
|
||||
|
||||
BOOL SHELL_ConfirmYesNoW(HWND hWnd, int nKindOfDialog, LPCWSTR szDir)
|
||||
@@ -321,18 +320,18 @@ BOOL SHELL_ConfirmYesNoW(HWND hWnd, int nKindOfDialog, LPCWSTR szDir)
|
||||
@@ -312,18 +311,18 @@ BOOL SHELL_ConfirmYesNoW(HWND hWnd, int nKindOfDialog, LPCWSTR szDir)
|
||||
|
||||
static DWORD SHELL32_AnsiToUnicodeBuf(LPCSTR aPath, LPWSTR *wPath, DWORD minChars)
|
||||
{
|
||||
@ -237,7 +237,7 @@ index 941dba725cd..7b5339acc92 100644
|
||||
}
|
||||
|
||||
HRESULT WINAPI SHIsFileAvailableOffline(LPCWSTR path, LPDWORD status)
|
||||
@@ -375,8 +374,8 @@ static DWORD SHELL_DeleteDirectoryW(HWND hwnd, LPCWSTR pszDir, BOOL bShowUI)
|
||||
@@ -366,8 +365,8 @@ static DWORD SHELL_DeleteDirectoryW(HWND hwnd, LPCWSTR pszDir, BOOL bShowUI)
|
||||
ret = SHNotifyRemoveDirectoryW(pszDir);
|
||||
|
||||
return ret == ERROR_PATH_NOT_FOUND ?
|
||||
@ -248,7 +248,7 @@ index 941dba725cd..7b5339acc92 100644
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
@@ -396,41 +395,41 @@ static DWORD SHELL_DeleteDirectoryW(HWND hwnd, LPCWSTR pszDir, BOOL bShowUI)
|
||||
@@ -387,41 +386,41 @@ static DWORD SHELL_DeleteDirectoryW(HWND hwnd, LPCWSTR pszDir, BOOL bShowUI)
|
||||
*/
|
||||
static DWORD SHNotifyCreateDirectoryA(LPCSTR path, LPSECURITY_ATTRIBUTES sec)
|
||||
{
|
||||
@ -310,7 +310,7 @@ index 941dba725cd..7b5339acc92 100644
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
@@ -450,51 +449,51 @@ BOOL WINAPI Win32CreateDirectoryAW(LPCVOID path, LPSECURITY_ATTRIBUTES sec)
|
||||
@@ -441,51 +440,51 @@ BOOL WINAPI Win32CreateDirectoryAW(LPCVOID path, LPSECURITY_ATTRIBUTES sec)
|
||||
*/
|
||||
static DWORD SHNotifyRemoveDirectoryA(LPCSTR path)
|
||||
{
|
||||
@ -392,7 +392,7 @@ index 941dba725cd..7b5339acc92 100644
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
@@ -514,52 +513,52 @@ BOOL WINAPI Win32RemoveDirectoryAW(LPCVOID path)
|
||||
@@ -505,52 +504,52 @@ BOOL WINAPI Win32RemoveDirectoryAW(LPCVOID path)
|
||||
*/
|
||||
static DWORD SHNotifyDeleteFileA(LPCSTR path)
|
||||
{
|
||||
@ -475,7 +475,7 @@ index 941dba725cd..7b5339acc92 100644
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
@@ -576,36 +575,36 @@ DWORD WINAPI Win32DeleteFileAW(LPCVOID path)
|
||||
@@ -567,36 +566,36 @@ DWORD WINAPI Win32DeleteFileAW(LPCVOID path)
|
||||
*/
|
||||
static DWORD SHNotifyMoveFileW(LPCWSTR src, LPCWSTR dest)
|
||||
{
|
||||
@ -537,7 +537,7 @@ index 941dba725cd..7b5339acc92 100644
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
@@ -624,24 +623,24 @@ static DWORD SHNotifyMoveFileW(LPCWSTR src, LPCWSTR dest)
|
||||
@@ -615,24 +614,24 @@ static DWORD SHNotifyMoveFileW(LPCWSTR src, LPCWSTR dest)
|
||||
*/
|
||||
static DWORD SHNotifyCopyFileW(LPCWSTR src, LPCWSTR dest, BOOL bFailIfExists)
|
||||
{
|
||||
@ -576,7 +576,7 @@ index 941dba725cd..7b5339acc92 100644
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
@@ -671,9 +670,9 @@ static DWORD SHNotifyCopyFileW(LPCWSTR src, LPCWSTR dest, BOOL bFailIfExists)
|
||||
@@ -662,9 +661,9 @@ static DWORD SHNotifyCopyFileW(LPCWSTR src, LPCWSTR dest, BOOL bFailIfExists)
|
||||
*/
|
||||
DWORD WINAPI SHCreateDirectory(HWND hWnd, LPCVOID path)
|
||||
{
|
||||
@ -589,7 +589,7 @@ index 941dba725cd..7b5339acc92 100644
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
@@ -710,18 +709,18 @@ DWORD WINAPI SHCreateDirectory(HWND hWnd, LPCVOID path)
|
||||
@@ -701,18 +700,18 @@ DWORD WINAPI SHCreateDirectory(HWND hWnd, LPCVOID path)
|
||||
*/
|
||||
int WINAPI SHCreateDirectoryExA(HWND hWnd, LPCSTR path, LPSECURITY_ATTRIBUTES sec)
|
||||
{
|
||||
@ -618,16 +618,16 @@ index 941dba725cd..7b5339acc92 100644
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
@@ -795,25 +794,25 @@ int WINAPI SHCreateDirectoryExW(HWND hWnd, LPCWSTR path, LPSECURITY_ATTRIBUTES s
|
||||
@@ -786,25 +785,25 @@ int WINAPI SHCreateDirectoryExW(HWND hWnd, LPCWSTR path, LPSECURITY_ATTRIBUTES s
|
||||
*/
|
||||
static DWORD SHFindAttrW(LPCWSTR pName, BOOL fileOnly)
|
||||
{
|
||||
- WIN32_FIND_DATAW wfd;
|
||||
- BOOL b_FileMask = fileOnly && (NULL != StrPBrkW(pName, wWildcardChars));
|
||||
- BOOL b_FileMask = fileOnly && (NULL != StrPBrkW(pName, L"*?"));
|
||||
- DWORD dwAttr = INVALID_FILE_ATTRIBUTES;
|
||||
- HANDLE hFind = FindFirstFileW(pName, &wfd);
|
||||
+ WIN32_FIND_DATAW wfd;
|
||||
+ BOOL b_FileMask = fileOnly && (NULL != StrPBrkW(pName, wWildcardChars));
|
||||
+ BOOL b_FileMask = fileOnly && (NULL != StrPBrkW(pName, L"*?"));
|
||||
+ DWORD dwAttr = INVALID_FILE_ATTRIBUTES;
|
||||
+ HANDLE hFind = FindFirstFileW(pName, &wfd);
|
||||
|
||||
@ -662,7 +662,7 @@ index 941dba725cd..7b5339acc92 100644
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
@@ -827,27 +826,27 @@ static DWORD SHFindAttrW(LPCWSTR pName, BOOL fileOnly)
|
||||
@@ -818,27 +817,27 @@ static DWORD SHFindAttrW(LPCWSTR pName, BOOL fileOnly)
|
||||
*/
|
||||
static DWORD SHNameTranslate(LPWSTR* wString, LPCWSTR* pWToFrom, BOOL more)
|
||||
{
|
||||
@ -710,7 +710,7 @@ index 941dba725cd..7b5339acc92 100644
|
||||
}
|
||||
/*************************************************************************
|
||||
* SHFileOperationA [SHELL32.@]
|
||||
@@ -867,46 +866,45 @@ static DWORD SHNameTranslate(LPWSTR* wString, LPCWSTR* pWToFrom, BOOL more)
|
||||
@@ -858,46 +857,45 @@ static DWORD SHNameTranslate(LPWSTR* wString, LPCWSTR* pWToFrom, BOOL more)
|
||||
*/
|
||||
int WINAPI SHFileOperationA(LPSHFILEOPSTRUCTA lpFileOp)
|
||||
{
|
||||
@ -794,7 +794,7 @@ index 941dba725cd..7b5339acc92 100644
|
||||
}
|
||||
|
||||
#define ERROR_SHELL_INTERNAL_FILE_NOT_FOUND 1026
|
||||
@@ -936,7 +934,7 @@ typedef struct
|
||||
@@ -927,7 +925,7 @@ typedef struct
|
||||
static inline void grow_list(FILE_LIST *list)
|
||||
{
|
||||
FILE_ENTRY *new = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, list->feFiles,
|
||||
@ -803,7 +803,7 @@ index 941dba725cd..7b5339acc92 100644
|
||||
list->feFiles = new;
|
||||
list->num_alloc *= 2;
|
||||
}
|
||||
@@ -1029,7 +1027,7 @@ static HRESULT parse_file_list(FILE_LIST *flList, LPCWSTR szFiles)
|
||||
@@ -1020,7 +1018,7 @@ static HRESULT parse_file_list(FILE_LIST *flList, LPCWSTR szFiles)
|
||||
/* empty list */
|
||||
if (!szFiles[0])
|
||||
return ERROR_ACCESS_DENIED;
|
||||
@ -812,7 +812,7 @@ index 941dba725cd..7b5339acc92 100644
|
||||
flList->feFiles = heap_alloc_zero(flList->num_alloc * sizeof(FILE_ENTRY));
|
||||
|
||||
while (*ptr)
|
||||
@@ -1134,7 +1132,7 @@ static void copy_dir_to_dir(FILE_OPERATION *op, const FILE_ENTRY *feFrom, LPCWST
|
||||
@@ -1123,7 +1121,7 @@ static void copy_dir_to_dir(FILE_OPERATION *op, const FILE_ENTRY *feFrom, LPCWST
|
||||
/* Don't ask the user about overwriting files when he accepted to overwrite the
|
||||
folder. FIXME: this is not exactly what Windows does - e.g. there would be
|
||||
an additional confirmation for a nested folder */
|
||||
@ -821,7 +821,7 @@ index 941dba725cd..7b5339acc92 100644
|
||||
|
||||
SHFileOperationW(&fileOp);
|
||||
}
|
||||
@@ -1381,11 +1379,11 @@ static int delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom)
|
||||
@@ -1369,11 +1367,11 @@ static int delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom)
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -835,7 +835,7 @@ index 941dba725cd..7b5339acc92 100644
|
||||
else
|
||||
ret = SHELL_DeleteDirectoryW(lpFileOp->hwnd, fileEntry->szFullPath, FALSE);
|
||||
|
||||
@@ -1510,8 +1508,8 @@ static int rename_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, con
|
||||
@@ -1498,8 +1496,8 @@ static int rename_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, con
|
||||
static void check_flags(FILEOP_FLAGS fFlags)
|
||||
{
|
||||
WORD wUnsupportedFlags = FOF_NO_CONNECTED_ELEMENTS |
|
||||
@ -846,7 +846,7 @@ index 941dba725cd..7b5339acc92 100644
|
||||
|
||||
if (fFlags & wUnsupportedFlags)
|
||||
FIXME("Unsupported flags: %04x\n", fFlags);
|
||||
@@ -1594,19 +1592,19 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
|
||||
@@ -1582,19 +1580,19 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
|
||||
*/
|
||||
void WINAPI SHFreeNameMappings(HANDLE hNameMapping)
|
||||
{
|
||||
@ -876,7 +876,7 @@ index 941dba725cd..7b5339acc92 100644
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
@@ -1712,14 +1710,14 @@ DWORD WINAPI SheChangeDirW(LPWSTR path)
|
||||
@@ -1700,14 +1698,14 @@ DWORD WINAPI SheChangeDirW(LPWSTR path)
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 7cbc2d3a95bdbd362138638b90a24c1b2b7cacfc Mon Sep 17 00:00:00 2001
|
||||
From a810107bb8baf40586def0905ef3bd98fe6c852f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Thu, 26 Feb 2015 23:21:26 +0100
|
||||
Subject: [PATCH] shell32: Pass FILE_INFORMATION into SHNotify* functions.
|
||||
@ -9,12 +9,12 @@ Preparation of the progressbar work. Based on a patch by Huw Campbell.
|
||||
1 file changed, 98 insertions(+), 103 deletions(-)
|
||||
|
||||
diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c
|
||||
index 7b5339acc92..85448bad7dd 100644
|
||||
index f0cadc67f8f..1ad2af6dd58 100644
|
||||
--- a/dlls/shell32/shlfileop.c
|
||||
+++ b/dlls/shell32/shlfileop.c
|
||||
@@ -62,16 +62,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell);
|
||||
static const WCHAR wWildcardFile[] = {'*',0};
|
||||
static const WCHAR wWildcardChars[] = {'*','?',0};
|
||||
@@ -56,16 +56,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell);
|
||||
#define DE_SAMEFILE 0x71
|
||||
#define DE_DESTSAMETREE 0x7D
|
||||
|
||||
-static DWORD SHNotifyCreateDirectoryA(LPCSTR path, LPSECURITY_ATTRIBUTES sec);
|
||||
-static DWORD SHNotifyCreateDirectoryW(LPCWSTR path, LPSECURITY_ATTRIBUTES sec);
|
||||
@ -29,7 +29,7 @@ index 7b5339acc92..85448bad7dd 100644
|
||||
typedef struct
|
||||
{
|
||||
SHFILEOPSTRUCTW *req;
|
||||
@@ -80,6 +70,42 @@ typedef struct
|
||||
@@ -74,6 +64,42 @@ typedef struct
|
||||
BOOL bCancelled;
|
||||
} FILE_OPERATION;
|
||||
|
||||
@ -71,8 +71,8 @@ index 7b5339acc92..85448bad7dd 100644
|
||||
+
|
||||
/* Confirm dialogs with an optional "Yes To All" as used in file operations confirmations
|
||||
*/
|
||||
static const WCHAR CONFIRM_MSG_PROP[] = {'W','I','N','E','_','C','O','N','F','I','R','M',0};
|
||||
@@ -346,7 +372,7 @@ HRESULT WINAPI SHIsFileAvailableOffline(LPCWSTR path, LPDWORD status)
|
||||
struct confirm_msg_info
|
||||
@@ -337,7 +363,7 @@ HRESULT WINAPI SHIsFileAvailableOffline(LPCWSTR path, LPDWORD status)
|
||||
* Asks for confirmation when bShowUI is true and deletes the directory and
|
||||
* all its subdirectories and files if necessary.
|
||||
*/
|
||||
@ -81,8 +81,8 @@ index 7b5339acc92..85448bad7dd 100644
|
||||
{
|
||||
DWORD ret = 0;
|
||||
HANDLE hFind;
|
||||
@@ -356,16 +382,18 @@ static DWORD SHELL_DeleteDirectoryW(HWND hwnd, LPCWSTR pszDir, BOOL bShowUI)
|
||||
PathCombineW(szTemp, pszDir, wWildcardFile);
|
||||
@@ -347,16 +373,18 @@ static DWORD SHELL_DeleteDirectoryW(HWND hwnd, LPCWSTR pszDir, BOOL bShowUI)
|
||||
PathCombineW(szTemp, pszDir, L"*");
|
||||
hFind = FindFirstFileW(szTemp, &wfd);
|
||||
|
||||
- if (hFind != INVALID_HANDLE_VALUE) {
|
||||
@ -104,7 +104,7 @@ index 7b5339acc92..85448bad7dd 100644
|
||||
} while (!ret && FindNextFileW(hFind, &wfd));
|
||||
}
|
||||
FindClose(hFind);
|
||||
@@ -496,22 +524,9 @@ BOOL WINAPI Win32RemoveDirectoryAW(LPCVOID path)
|
||||
@@ -487,22 +515,9 @@ BOOL WINAPI Win32RemoveDirectoryAW(LPCVOID path)
|
||||
return (SHNotifyRemoveDirectoryA(path) == ERROR_SUCCESS);
|
||||
}
|
||||
|
||||
@ -130,7 +130,7 @@ index 7b5339acc92..85448bad7dd 100644
|
||||
{
|
||||
LPWSTR wPath;
|
||||
DWORD retCode;
|
||||
@@ -521,7 +536,7 @@ static DWORD SHNotifyDeleteFileA(LPCSTR path)
|
||||
@@ -512,7 +527,7 @@ static DWORD SHNotifyDeleteFileA(LPCSTR path)
|
||||
retCode = SHELL32_AnsiToUnicodeBuf(path, &wPath, 0);
|
||||
if (!retCode)
|
||||
{
|
||||
@ -139,7 +139,7 @@ index 7b5339acc92..85448bad7dd 100644
|
||||
heap_free(wPath);
|
||||
}
|
||||
return retCode;
|
||||
@@ -529,12 +544,14 @@ static DWORD SHNotifyDeleteFileA(LPCSTR path)
|
||||
@@ -520,12 +535,14 @@ static DWORD SHNotifyDeleteFileA(LPCSTR path)
|
||||
|
||||
/***********************************************************************/
|
||||
|
||||
@ -155,7 +155,7 @@ index 7b5339acc92..85448bad7dd 100644
|
||||
ret = DeleteFileW(path);
|
||||
if (!ret)
|
||||
{
|
||||
@@ -557,8 +574,8 @@ static DWORD SHNotifyDeleteFileW(LPCWSTR path)
|
||||
@@ -548,8 +565,8 @@ static DWORD SHNotifyDeleteFileW(LPCWSTR path)
|
||||
DWORD WINAPI Win32DeleteFileAW(LPCVOID path)
|
||||
{
|
||||
if (SHELL_OsIsUnicode())
|
||||
@ -166,7 +166,7 @@ index 7b5339acc92..85448bad7dd 100644
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
@@ -567,18 +584,21 @@ DWORD WINAPI Win32DeleteFileAW(LPCVOID path)
|
||||
@@ -558,18 +575,21 @@ DWORD WINAPI Win32DeleteFileAW(LPCVOID path)
|
||||
* Moves a file. Also triggers a change notify if one exists.
|
||||
*
|
||||
* PARAMS
|
||||
@ -189,7 +189,7 @@ index 7b5339acc92..85448bad7dd 100644
|
||||
ret = MoveFileExW(src, dest, MOVEFILE_REPLACE_EXISTING);
|
||||
|
||||
/* MOVEFILE_REPLACE_EXISTING fails with dirs, so try MoveFile */
|
||||
@@ -613,6 +633,7 @@ static DWORD SHNotifyMoveFileW(LPCWSTR src, LPCWSTR dest)
|
||||
@@ -604,6 +624,7 @@ static DWORD SHNotifyMoveFileW(LPCWSTR src, LPCWSTR dest)
|
||||
* Copies a file. Also triggers a change notify if one exists.
|
||||
*
|
||||
* PARAMS
|
||||
@ -197,7 +197,7 @@ index 7b5339acc92..85448bad7dd 100644
|
||||
* src [I] path to source file to move
|
||||
* dest [I] path to target file to move to
|
||||
* bFailIfExists [I] if TRUE, the target file will not be overwritten if
|
||||
@@ -621,13 +642,15 @@ static DWORD SHNotifyMoveFileW(LPCWSTR src, LPCWSTR dest)
|
||||
@@ -612,13 +633,15 @@ static DWORD SHNotifyMoveFileW(LPCWSTR src, LPCWSTR dest)
|
||||
* RETURNS
|
||||
* ERROR_SUCCESS if successful
|
||||
*/
|
||||
@ -214,7 +214,7 @@ index 7b5339acc92..85448bad7dd 100644
|
||||
/* Destination file may already exist with read only attribute */
|
||||
attribs = GetFileAttributesW(dest);
|
||||
if (IsAttrib(attribs, FILE_ATTRIBUTE_READONLY))
|
||||
@@ -907,30 +930,6 @@ int WINAPI SHFileOperationA(LPSHFILEOPSTRUCTA lpFileOp)
|
||||
@@ -898,30 +921,6 @@ int WINAPI SHFileOperationA(LPSHFILEOPSTRUCTA lpFileOp)
|
||||
return retCode;
|
||||
}
|
||||
|
||||
@ -245,17 +245,17 @@ index 7b5339acc92..85448bad7dd 100644
|
||||
static inline void grow_list(FILE_LIST *list)
|
||||
{
|
||||
FILE_ENTRY *new = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, list->feFiles,
|
||||
@@ -1096,7 +1095,7 @@ static void destroy_file_list(FILE_LIST *flList)
|
||||
@@ -1087,7 +1086,7 @@ static void destroy_file_list(FILE_LIST *flList)
|
||||
static void copy_dir_to_dir(FILE_OPERATION *op, const FILE_ENTRY *feFrom, LPCWSTR szDestPath)
|
||||
{
|
||||
WCHAR szFrom[MAX_PATH], szTo[MAX_PATH];
|
||||
- SHFILEOPSTRUCTW fileOp;
|
||||
+ FILE_LIST flFromNew, flToNew;
|
||||
|
||||
static const WCHAR wildCardFiles[] = {'*','.','*',0};
|
||||
|
||||
@@ -1124,17 +1123,16 @@ static void copy_dir_to_dir(FILE_OPERATION *op, const FILE_ENTRY *feFrom, LPCWST
|
||||
PathCombineW(szFrom, feFrom->szFullPath, wildCardFiles);
|
||||
if (IsDotDir(feFrom->szFilename))
|
||||
return;
|
||||
@@ -1113,17 +1112,16 @@ static void copy_dir_to_dir(FILE_OPERATION *op, const FILE_ENTRY *feFrom, LPCWST
|
||||
PathCombineW(szFrom, feFrom->szFullPath, L"*.*");
|
||||
szFrom[lstrlenW(szFrom) + 1] = '\0';
|
||||
|
||||
- fileOp = *op->req;
|
||||
@ -280,7 +280,7 @@ index 7b5339acc92..85448bad7dd 100644
|
||||
}
|
||||
|
||||
static BOOL copy_file_to_file(FILE_OPERATION *op, const WCHAR *szFrom, const WCHAR *szTo)
|
||||
@@ -1145,7 +1143,7 @@ static BOOL copy_file_to_file(FILE_OPERATION *op, const WCHAR *szFrom, const WCH
|
||||
@@ -1134,7 +1132,7 @@ static BOOL copy_file_to_file(FILE_OPERATION *op, const WCHAR *szFrom, const WCH
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -289,7 +289,7 @@ index 7b5339acc92..85448bad7dd 100644
|
||||
}
|
||||
|
||||
/* copy a file or directory to another directory */
|
||||
@@ -1185,7 +1183,7 @@ static void create_dest_dirs(LPCWSTR szDestDir)
|
||||
@@ -1174,7 +1172,7 @@ static void create_dest_dirs(LPCWSTR szDestDir)
|
||||
}
|
||||
|
||||
/* the FO_COPY operation */
|
||||
@ -298,7 +298,7 @@ index 7b5339acc92..85448bad7dd 100644
|
||||
{
|
||||
DWORD i;
|
||||
const FILE_ENTRY *entryToCopy;
|
||||
@@ -1208,7 +1206,7 @@ static int copy_files(FILE_OPERATION *op, const FILE_LIST *flFrom, FILE_LIST *fl
|
||||
@@ -1197,7 +1195,7 @@ static int copy_files(FILE_OPERATION *op, const FILE_LIST *flFrom, FILE_LIST *fl
|
||||
fileDest = &flTo->feFiles[0];
|
||||
}
|
||||
|
||||
@ -307,7 +307,7 @@ index 7b5339acc92..85448bad7dd 100644
|
||||
{
|
||||
if (flFrom->bAnyFromWildcard)
|
||||
return ERROR_CANCELLED;
|
||||
@@ -1260,8 +1258,7 @@ static int copy_files(FILE_OPERATION *op, const FILE_LIST *flFrom, FILE_LIST *fl
|
||||
@@ -1249,8 +1247,7 @@ static int copy_files(FILE_OPERATION *op, const FILE_LIST *flFrom, FILE_LIST *fl
|
||||
{
|
||||
entryToCopy = &flFrom->feFiles[i];
|
||||
|
||||
@ -317,7 +317,7 @@ index 7b5339acc92..85448bad7dd 100644
|
||||
{
|
||||
fileDest = &flTo->feFiles[i];
|
||||
}
|
||||
@@ -1333,7 +1330,7 @@ static BOOL confirm_delete_list(HWND hWnd, DWORD fFlags, BOOL fTrash, const FILE
|
||||
@@ -1321,7 +1318,7 @@ static BOOL confirm_delete_list(HWND hWnd, DWORD fFlags, BOOL fTrash, const FILE
|
||||
}
|
||||
|
||||
/* the FO_DELETE operation */
|
||||
@ -326,7 +326,7 @@ index 7b5339acc92..85448bad7dd 100644
|
||||
{
|
||||
const FILE_ENTRY *fileEntry;
|
||||
DWORD i;
|
||||
@@ -1344,12 +1341,12 @@ static int delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom)
|
||||
@@ -1332,12 +1329,12 @@ static int delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom)
|
||||
return ERROR_SUCCESS;
|
||||
|
||||
/* Windows also checks only the first item */
|
||||
@ -343,7 +343,7 @@ index 7b5339acc92..85448bad7dd 100644
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1358,7 +1355,7 @@ static int delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom)
|
||||
@@ -1346,7 +1343,7 @@ static int delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom)
|
||||
fileEntry = &flFrom->feFiles[i];
|
||||
|
||||
if (!IsAttribFile(fileEntry->attributes) &&
|
||||
@ -352,7 +352,7 @@ index 7b5339acc92..85448bad7dd 100644
|
||||
continue;
|
||||
|
||||
if (bTrash)
|
||||
@@ -1368,14 +1365,14 @@ static int delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom)
|
||||
@@ -1356,14 +1353,14 @@ static int delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom)
|
||||
continue;
|
||||
|
||||
/* Note: Windows silently deletes the file in such a situation, we show a dialog */
|
||||
@ -370,7 +370,7 @@ index 7b5339acc92..85448bad7dd 100644
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1385,7 +1382,7 @@ static int delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom)
|
||||
@@ -1373,7 +1370,7 @@ static int delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom)
|
||||
ret = DeleteFileW(fileEntry->szFullPath) ?
|
||||
ERROR_SUCCESS : GetLastError();
|
||||
else
|
||||
@ -379,7 +379,7 @@ index 7b5339acc92..85448bad7dd 100644
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
@@ -1395,16 +1392,16 @@ static int delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom)
|
||||
@@ -1383,16 +1380,16 @@ static int delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom)
|
||||
}
|
||||
|
||||
/* moves a file or directory to another directory */
|
||||
@ -399,7 +399,7 @@ index 7b5339acc92..85448bad7dd 100644
|
||||
{
|
||||
DWORD i;
|
||||
INT mismatched = 0;
|
||||
@@ -1417,14 +1414,12 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
|
||||
@@ -1405,14 +1402,12 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
|
||||
if (!flTo->dwNumFiles)
|
||||
return ERROR_FILE_NOT_FOUND;
|
||||
|
||||
@ -416,7 +416,7 @@ index 7b5339acc92..85448bad7dd 100644
|
||||
flFrom->dwNumFiles > flTo->dwNumFiles)
|
||||
{
|
||||
return ERROR_CANCELLED;
|
||||
@@ -1437,7 +1432,7 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
|
||||
@@ -1425,7 +1420,7 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -425,7 +425,7 @@ index 7b5339acc92..85448bad7dd 100644
|
||||
mismatched = flFrom->dwNumFiles - flTo->dwNumFiles;
|
||||
|
||||
fileDest = &flTo->feFiles[0];
|
||||
@@ -1448,7 +1443,7 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
|
||||
@@ -1436,7 +1431,7 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
|
||||
if (!PathFileExistsW(fileDest->szDirectory))
|
||||
return ERROR_CANCELLED;
|
||||
|
||||
@ -434,7 +434,7 @@ index 7b5339acc92..85448bad7dd 100644
|
||||
{
|
||||
if (i >= flTo->dwNumFiles)
|
||||
break;
|
||||
@@ -1462,9 +1457,9 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
|
||||
@@ -1450,9 +1445,9 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
|
||||
}
|
||||
|
||||
if (fileDest->bExists && IsAttribDir(fileDest->attributes))
|
||||
@ -446,7 +446,7 @@ index 7b5339acc92..85448bad7dd 100644
|
||||
}
|
||||
|
||||
if (mismatched > 0)
|
||||
@@ -1479,7 +1474,7 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
|
||||
@@ -1467,7 +1462,7 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
|
||||
}
|
||||
|
||||
/* the FO_RENAME files */
|
||||
@ -455,7 +455,7 @@ index 7b5339acc92..85448bad7dd 100644
|
||||
{
|
||||
const FILE_ENTRY *feFrom;
|
||||
const FILE_ENTRY *feTo;
|
||||
@@ -1501,7 +1496,7 @@ static int rename_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, con
|
||||
@@ -1489,7 +1484,7 @@ static int rename_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, con
|
||||
if (feTo->bExists)
|
||||
return ERROR_ALREADY_EXISTS;
|
||||
|
||||
@ -464,7 +464,7 @@ index 7b5339acc92..85448bad7dd 100644
|
||||
}
|
||||
|
||||
/* alert the user if an unsupported flag is used */
|
||||
@@ -1548,16 +1543,16 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
|
||||
@@ -1536,16 +1531,16 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
|
||||
switch (lpFileOp->wFunc)
|
||||
{
|
||||
case FO_COPY:
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 10a17211f70192614d6e799ed76fe811b120dcc2 Mon Sep 17 00:00:00 2001
|
||||
From c7362e2cda63ee0be3ac48b8d75cb2b30d79f4d8 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Fri, 27 Feb 2015 01:04:33 +0100
|
||||
Subject: [PATCH] shell32: Implement file operation progress dialog.
|
||||
@ -29,10 +29,10 @@ index f7f8eea2da5..eb03982f6a9 100644
|
||||
IDS_RESTART_TITLE "Restart"
|
||||
IDS_RESTART_PROMPT "Do you want to simulate a Windows reboot?"
|
||||
diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c
|
||||
index 50ee0486a23..4c8dcb00ac6 100644
|
||||
index 86367b53b69..39159731599 100644
|
||||
--- a/dlls/shell32/shlfileop.c
|
||||
+++ b/dlls/shell32/shlfileop.c
|
||||
@@ -65,6 +65,10 @@ typedef struct
|
||||
@@ -72,6 +72,10 @@ typedef struct
|
||||
DWORD dwYesToAllMask;
|
||||
BOOL bManyItems;
|
||||
BOOL bCancelled;
|
||||
@ -43,7 +43,7 @@ index 50ee0486a23..4c8dcb00ac6 100644
|
||||
} FILE_OPERATION;
|
||||
|
||||
typedef struct
|
||||
@@ -103,6 +107,12 @@ static DWORD SHFindAttrW(LPCWSTR pName, BOOL fileOnly);
|
||||
@@ -110,6 +114,12 @@ static DWORD SHFindAttrW(LPCWSTR pName, BOOL fileOnly);
|
||||
static int copy_files(FILE_OPERATION *op, BOOL multidest, const FILE_LIST *flFrom, FILE_LIST *flTo);
|
||||
static int move_files(FILE_OPERATION *op, BOOL multidest, const FILE_LIST *flFrom, const FILE_LIST *flTo);
|
||||
|
||||
@ -55,8 +55,8 @@ index 50ee0486a23..4c8dcb00ac6 100644
|
||||
+
|
||||
/* Confirm dialogs with an optional "Yes To All" as used in file operations confirmations
|
||||
*/
|
||||
static const WCHAR CONFIRM_MSG_PROP[] = {'W','I','N','E','_','C','O','N','F','I','R','M',0};
|
||||
@@ -391,6 +401,13 @@ static DWORD SHELL_DeleteDirectoryW(FILE_OPERATION *op, LPCWSTR pszDir, BOOL bSh
|
||||
struct confirm_msg_info
|
||||
@@ -395,6 +405,13 @@ static DWORD SHELL_DeleteDirectoryW(FILE_OPERATION *op, LPCWSTR pszDir, BOOL bSh
|
||||
ret = SHELL_DeleteDirectoryW(op, szTemp, FALSE);
|
||||
else
|
||||
ret = SHNotifyDeleteFileW(op, szTemp);
|
||||
@ -70,7 +70,7 @@ index 50ee0486a23..4c8dcb00ac6 100644
|
||||
} while (!ret && FindNextFileW(hFind, &wfd));
|
||||
}
|
||||
FindClose(hFind);
|
||||
@@ -544,10 +561,22 @@ static DWORD SHNotifyDeleteFileA(FILE_OPERATION *op, LPCSTR path)
|
||||
@@ -548,10 +565,22 @@ static DWORD SHNotifyDeleteFileA(FILE_OPERATION *op, LPCSTR path)
|
||||
static DWORD SHNotifyDeleteFileW(FILE_OPERATION *op, LPCWSTR path)
|
||||
{
|
||||
BOOL ret;
|
||||
@ -94,7 +94,7 @@ index 50ee0486a23..4c8dcb00ac6 100644
|
||||
|
||||
ret = DeleteFileW(path);
|
||||
if (!ret)
|
||||
@@ -560,6 +589,14 @@ static DWORD SHNotifyDeleteFileW(FILE_OPERATION *op, LPCWSTR path)
|
||||
@@ -564,6 +593,14 @@ static DWORD SHNotifyDeleteFileW(FILE_OPERATION *op, LPCWSTR path)
|
||||
}
|
||||
if (ret)
|
||||
{
|
||||
@ -109,7 +109,7 @@ index 50ee0486a23..4c8dcb00ac6 100644
|
||||
SHChangeNotify(SHCNE_DELETE, SHCNF_PATHW, path, NULL);
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
@@ -594,9 +631,10 @@ static DWORD SHNotifyMoveFileW(FILE_OPERATION *op, LPCWSTR src, LPCWSTR dest)
|
||||
@@ -598,9 +635,10 @@ static DWORD SHNotifyMoveFileW(FILE_OPERATION *op, LPCWSTR src, LPCWSTR dest)
|
||||
|
||||
TRACE("(%s %s)\n", debugstr_w(src), debugstr_w(dest));
|
||||
|
||||
@ -122,7 +122,7 @@ index 50ee0486a23..4c8dcb00ac6 100644
|
||||
|
||||
/* MOVEFILE_REPLACE_EXISTING fails with dirs, so try MoveFile */
|
||||
if (!ret)
|
||||
@@ -646,14 +684,15 @@ static DWORD SHNotifyCopyFileW(FILE_OPERATION *op, LPCWSTR src, LPCWSTR dest, BO
|
||||
@@ -650,14 +688,15 @@ static DWORD SHNotifyCopyFileW(FILE_OPERATION *op, LPCWSTR src, LPCWSTR dest, BO
|
||||
|
||||
TRACE("(%s %s %s)\n", debugstr_w(src), debugstr_w(dest), bFailIfExists ? "failIfExists" : "");
|
||||
|
||||
@ -140,7 +140,7 @@ index 50ee0486a23..4c8dcb00ac6 100644
|
||||
if (ret)
|
||||
{
|
||||
SHChangeNotify(SHCNE_CREATE, SHCNF_PATHW, dest, NULL);
|
||||
@@ -1295,6 +1334,8 @@ static int copy_files(FILE_OPERATION *op, BOOL multidest, const FILE_LIST *flFro
|
||||
@@ -1297,6 +1336,8 @@ static int copy_files(FILE_OPERATION *op, BOOL multidest, const FILE_LIST *flFro
|
||||
}
|
||||
|
||||
/* Vista return code. XP would return e.g. ERROR_FILE_NOT_FOUND, ERROR_ALREADY_EXISTS */
|
||||
@ -149,7 +149,7 @@ index 50ee0486a23..4c8dcb00ac6 100644
|
||||
if (op->bCancelled)
|
||||
return ERROR_CANCELLED;
|
||||
}
|
||||
@@ -1376,13 +1417,17 @@ static int delete_files(FILE_OPERATION *op, const FILE_LIST *flFrom)
|
||||
@@ -1377,13 +1418,17 @@ static int delete_files(FILE_OPERATION *op, const FILE_LIST *flFrom)
|
||||
|
||||
/* delete the file or directory */
|
||||
if (IsAttribFile(fileEntry->attributes))
|
||||
@ -169,7 +169,7 @@ index 50ee0486a23..4c8dcb00ac6 100644
|
||||
}
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
@@ -1457,6 +1502,11 @@ static int move_files(FILE_OPERATION *op, BOOL multidest, const FILE_LIST *flFro
|
||||
@@ -1458,6 +1503,11 @@ static int move_files(FILE_OPERATION *op, BOOL multidest, const FILE_LIST *flFro
|
||||
move_to_dir(op, entryToMove, fileDest);
|
||||
else
|
||||
SHNotifyMoveFileW(op, entryToMove->szFullPath, fileDest->szFullPath);
|
||||
@ -181,7 +181,7 @@ index 50ee0486a23..4c8dcb00ac6 100644
|
||||
}
|
||||
|
||||
if (mismatched > 0)
|
||||
@@ -1516,6 +1566,7 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
|
||||
@@ -1517,6 +1567,7 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
|
||||
{
|
||||
FILE_OPERATION op;
|
||||
FILE_LIST flFrom, flTo;
|
||||
@ -189,7 +189,7 @@ index 50ee0486a23..4c8dcb00ac6 100644
|
||||
int ret = 0;
|
||||
|
||||
if (!lpFileOp)
|
||||
@@ -1534,9 +1585,31 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
|
||||
@@ -1535,9 +1586,31 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
|
||||
|
||||
ZeroMemory(&op, sizeof(op));
|
||||
op.req = lpFileOp;
|
||||
@ -221,7 +221,7 @@ index 50ee0486a23..4c8dcb00ac6 100644
|
||||
switch (lpFileOp->wFunc)
|
||||
{
|
||||
case FO_COPY:
|
||||
@@ -1556,6 +1629,12 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
|
||||
@@ -1557,6 +1630,12 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
|
||||
break;
|
||||
}
|
||||
|
||||
@ -234,7 +234,7 @@ index 50ee0486a23..4c8dcb00ac6 100644
|
||||
destroy_file_list(&flFrom);
|
||||
|
||||
if (lpFileOp->wFunc != FO_DELETE)
|
||||
@@ -1564,6 +1643,9 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
|
||||
@@ -1565,6 +1644,9 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
|
||||
if (ret == ERROR_CANCELLED)
|
||||
lpFileOp->fAnyOperationsAborted = TRUE;
|
||||
|
||||
@ -244,7 +244,7 @@ index 50ee0486a23..4c8dcb00ac6 100644
|
||||
SetLastError(ERROR_SUCCESS);
|
||||
return ret;
|
||||
}
|
||||
@@ -2052,3 +2134,184 @@ HRESULT WINAPI IFileOperation_Constructor(IUnknown *outer, REFIID riid, void **o
|
||||
@@ -2053,3 +2135,184 @@ HRESULT WINAPI IFileOperation_Constructor(IUnknown *outer, REFIID riid, void **o
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
Reference in New Issue
Block a user