Rebase against f9e1dbb83d850a2f7cb17079e02de139e2f8b920

This commit is contained in:
Alistair Leslie-Hughes
2018-02-23 09:33:49 +11:00
parent 84fb9656a1
commit 9d84ed42f1
42 changed files with 412 additions and 677 deletions

View File

@@ -1,17 +1,17 @@
From 10dda0bfac5b79169b84f5a6eb97f0a8aee7a4eb Mon Sep 17 00:00:00 2001
From 60b2a9f4bbbda5675491ae323b97fdcc84dacc4f 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: shell32: Correct indentation in shfileop.c.
Subject: [PATCH] shell32: Correct indentation in shfileop.c.
---
dlls/shell32/shlfileop.c | 728 +++++++++++++++++++++++------------------------
1 file changed, 364 insertions(+), 364 deletions(-)
dlls/shell32/shlfileop.c | 726 +++++++++++++++++++++++------------------------
1 file changed, 363 insertions(+), 363 deletions(-)
diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c
index 07635c8..ef2532d 100644
index c18a3e9..91d5781 100644
--- a/dlls/shell32/shlfileop.c
+++ b/dlls/shell32/shlfileop.c
@@ -164,7 +164,7 @@ static INT_PTR ConfirmMsgBox_Init(HWND hDlg, LPARAM lParam)
@@ -165,7 +165,7 @@ static INT_PTR ConfirmMsgBox_Init(HWND hDlg, LPARAM lParam)
width = r.right - r.left;
height = r.bottom - r.top - yOffset;
MoveWindow(hDlg, (GetSystemMetrics(SM_CXSCREEN) - width)/2,
@@ -20,7 +20,7 @@ index 07635c8..ef2532d 100644
confirm_msg_move_button(hDlg, IDCANCEL, &xPos, yOffset, info->bYesToAll);
confirm_msg_move_button(hDlg, IDNO, &xPos, yOffset, TRUE);
@@ -206,107 +206,107 @@ static int SHELL_ConfirmMsgBox(HWND hWnd, LPWSTR lpszText, LPWSTR lpszCaption, H
@@ -207,107 +207,107 @@ static int SHELL_ConfirmMsgBox(HWND hWnd, LPWSTR lpszText, LPWSTR lpszCaption, H
/* confirmation dialogs content */
typedef struct
{
@@ -185,7 +185,7 @@ index 07635c8..ef2532d 100644
}
BOOL SHELL_ConfirmYesNoW(HWND hWnd, int nKindOfDialog, LPCWSTR szDir)
@@ -316,23 +316,23 @@ BOOL SHELL_ConfirmYesNoW(HWND hWnd, int nKindOfDialog, LPCWSTR szDir)
@@ -317,18 +317,18 @@ BOOL SHELL_ConfirmYesNoW(HWND hWnd, int nKindOfDialog, LPCWSTR szDir)
static DWORD SHELL32_AnsiToUnicodeBuf(LPCSTR aPath, LPWSTR *wPath, DWORD minChars)
{
@@ -194,7 +194,7 @@ index 07635c8..ef2532d 100644
- if (len < minChars)
- len = minChars;
-
- *wPath = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
- *wPath = heap_alloc(len * sizeof(WCHAR));
- if (*wPath)
- {
- MultiByteToWideChar(CP_ACP, 0, aPath, -1, *wPath, len);
@@ -206,7 +206,7 @@ index 07635c8..ef2532d 100644
+ if (len < minChars)
+ len = minChars;
+
+ *wPath = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
+ *wPath = heap_alloc(len * sizeof(WCHAR));
+ if (*wPath)
+ {
+ MultiByteToWideChar(CP_ACP, 0, aPath, -1, *wPath, len);
@@ -215,14 +215,8 @@ index 07635c8..ef2532d 100644
+ return E_OUTOFMEMORY;
}
static void SHELL32_FreeUnicodeBuf(LPWSTR wPath)
{
- HeapFree(GetProcessHeap(), 0, wPath);
+ HeapFree(GetProcessHeap(), 0, wPath);
}
HRESULT WINAPI SHIsFileAvailableOffline(LPCWSTR path, LPDWORD status)
@@ -375,8 +375,8 @@ static DWORD SHELL_DeleteDirectoryW(HWND hwnd, LPCWSTR pszDir, BOOL bShowUI)
@@ -371,8 +371,8 @@ static DWORD SHELL_DeleteDirectoryW(HWND hwnd, LPCWSTR pszDir, BOOL bShowUI)
ret = SHNotifyRemoveDirectoryW(pszDir);
return ret == ERROR_PATH_NOT_FOUND ?
@@ -233,7 +227,7 @@ index 07635c8..ef2532d 100644
}
/**************************************************************************
@@ -396,41 +396,41 @@ static DWORD SHELL_DeleteDirectoryW(HWND hwnd, LPCWSTR pszDir, BOOL bShowUI)
@@ -392,41 +392,41 @@ static DWORD SHELL_DeleteDirectoryW(HWND hwnd, LPCWSTR pszDir, BOOL bShowUI)
*/
static DWORD SHNotifyCreateDirectoryA(LPCSTR path, LPSECURITY_ATTRIBUTES sec)
{
@@ -246,7 +240,7 @@ index 07635c8..ef2532d 100644
- if (!retCode)
- {
- retCode = SHNotifyCreateDirectoryW(wPath, sec);
- SHELL32_FreeUnicodeBuf(wPath);
- heap_free(wPath);
- }
- return retCode;
+ LPWSTR wPath;
@@ -258,7 +252,7 @@ index 07635c8..ef2532d 100644
+ if (!retCode)
+ {
+ retCode = SHNotifyCreateDirectoryW(wPath, sec);
+ SHELL32_FreeUnicodeBuf(wPath);
+ heap_free(wPath);
+ }
+ return retCode;
}
@@ -298,7 +292,7 @@ index 07635c8..ef2532d 100644
}
/************************************************************************
@@ -450,51 +450,51 @@ BOOL WINAPI Win32CreateDirectoryAW(LPCVOID path, LPSECURITY_ATTRIBUTES sec)
@@ -446,51 +446,51 @@ BOOL WINAPI Win32CreateDirectoryAW(LPCVOID path, LPSECURITY_ATTRIBUTES sec)
*/
static DWORD SHNotifyRemoveDirectoryA(LPCSTR path)
{
@@ -311,7 +305,7 @@ index 07635c8..ef2532d 100644
- if (!retCode)
- {
- retCode = SHNotifyRemoveDirectoryW(wPath);
- SHELL32_FreeUnicodeBuf(wPath);
- heap_free(wPath);
- }
- return retCode;
+ LPWSTR wPath;
@@ -323,7 +317,7 @@ index 07635c8..ef2532d 100644
+ if (!retCode)
+ {
+ retCode = SHNotifyRemoveDirectoryW(wPath);
+ SHELL32_FreeUnicodeBuf(wPath);
+ heap_free(wPath);
+ }
+ return retCode;
}
@@ -383,7 +377,7 @@ index 07635c8..ef2532d 100644
}
/************************************************************************
@@ -514,52 +514,52 @@ BOOL WINAPI Win32RemoveDirectoryAW(LPCVOID path)
@@ -510,52 +510,52 @@ BOOL WINAPI Win32RemoveDirectoryAW(LPCVOID path)
*/
static DWORD SHNotifyDeleteFileA(LPCSTR path)
{
@@ -396,7 +390,7 @@ index 07635c8..ef2532d 100644
- if (!retCode)
- {
- retCode = SHNotifyDeleteFileW(wPath);
- SHELL32_FreeUnicodeBuf(wPath);
- heap_free(wPath);
- }
- return retCode;
+ LPWSTR wPath;
@@ -408,7 +402,7 @@ index 07635c8..ef2532d 100644
+ if (!retCode)
+ {
+ retCode = SHNotifyDeleteFileW(wPath);
+ SHELL32_FreeUnicodeBuf(wPath);
+ heap_free(wPath);
+ }
+ return retCode;
}
@@ -470,7 +464,7 @@ index 07635c8..ef2532d 100644
}
/************************************************************************
@@ -576,36 +576,36 @@ DWORD WINAPI Win32DeleteFileAW(LPCVOID path)
@@ -572,36 +572,36 @@ DWORD WINAPI Win32DeleteFileAW(LPCVOID path)
*/
static DWORD SHNotifyMoveFileW(LPCWSTR src, LPCWSTR dest)
{
@@ -537,7 +531,7 @@ index 07635c8..ef2532d 100644
}
/************************************************************************
@@ -624,24 +624,24 @@ static DWORD SHNotifyMoveFileW(LPCWSTR src, LPCWSTR dest)
@@ -620,24 +620,24 @@ static DWORD SHNotifyMoveFileW(LPCWSTR src, LPCWSTR dest)
*/
static DWORD SHNotifyCopyFileW(LPCWSTR src, LPCWSTR dest, BOOL bFailIfExists)
{
@@ -576,7 +570,7 @@ index 07635c8..ef2532d 100644
}
/*************************************************************************
@@ -671,9 +671,9 @@ static DWORD SHNotifyCopyFileW(LPCWSTR src, LPCWSTR dest, BOOL bFailIfExists)
@@ -667,9 +667,9 @@ static DWORD SHNotifyCopyFileW(LPCWSTR src, LPCWSTR dest, BOOL bFailIfExists)
*/
DWORD WINAPI SHCreateDirectory(HWND hWnd, LPCVOID path)
{
@@ -589,7 +583,7 @@ index 07635c8..ef2532d 100644
}
/*************************************************************************
@@ -710,18 +710,18 @@ DWORD WINAPI SHCreateDirectory(HWND hWnd, LPCVOID path)
@@ -706,18 +706,18 @@ DWORD WINAPI SHCreateDirectory(HWND hWnd, LPCVOID path)
*/
int WINAPI SHCreateDirectoryExA(HWND hWnd, LPCSTR path, LPSECURITY_ATTRIBUTES sec)
{
@@ -602,7 +596,7 @@ index 07635c8..ef2532d 100644
- if (!retCode)
- {
- retCode = SHCreateDirectoryExW(hWnd, wPath, sec);
- SHELL32_FreeUnicodeBuf(wPath);
- heap_free(wPath);
- }
- return retCode;
+ LPWSTR wPath;
@@ -614,13 +608,13 @@ index 07635c8..ef2532d 100644
+ if (!retCode)
+ {
+ retCode = SHCreateDirectoryExW(hWnd, wPath, sec);
+ SHELL32_FreeUnicodeBuf(wPath);
+ heap_free(wPath);
+ }
+ return retCode;
}
/*************************************************************************
@@ -731,49 +731,49 @@ int WINAPI SHCreateDirectoryExA(HWND hWnd, LPCSTR path, LPSECURITY_ATTRIBUTES se
@@ -727,49 +727,49 @@ int WINAPI SHCreateDirectoryExA(HWND hWnd, LPCSTR path, LPSECURITY_ATTRIBUTES se
*/
int WINAPI SHCreateDirectoryExW(HWND hWnd, LPCWSTR path, LPSECURITY_ATTRIBUTES sec)
{
@@ -713,7 +707,7 @@ index 07635c8..ef2532d 100644
}
/*************************************************************************
@@ -793,25 +793,25 @@ int WINAPI SHCreateDirectoryExW(HWND hWnd, LPCWSTR path, LPSECURITY_ATTRIBUTES s
@@ -789,25 +789,25 @@ int WINAPI SHCreateDirectoryExW(HWND hWnd, LPCWSTR path, LPSECURITY_ATTRIBUTES s
*/
static DWORD SHFindAttrW(LPCWSTR pName, BOOL fileOnly)
{
@@ -758,7 +752,7 @@ index 07635c8..ef2532d 100644
}
/*************************************************************************
@@ -825,27 +825,27 @@ static DWORD SHFindAttrW(LPCWSTR pName, BOOL fileOnly)
@@ -821,27 +821,27 @@ static DWORD SHFindAttrW(LPCWSTR pName, BOOL fileOnly)
*/
static DWORD SHNameTranslate(LPWSTR* wString, LPCWSTR* pWToFrom, BOOL more)
{
@@ -807,7 +801,7 @@ index 07635c8..ef2532d 100644
}
/*************************************************************************
* SHFileOperationA [SHELL32.@]
@@ -865,42 +865,42 @@ static DWORD SHNameTranslate(LPWSTR* wString, LPCWSTR* pWToFrom, BOOL more)
@@ -861,42 +861,42 @@ static DWORD SHNameTranslate(LPWSTR* wString, LPCWSTR* pWToFrom, BOOL more)
*/
int WINAPI SHFileOperationA(LPSHFILEOPSTRUCTA lpFileOp)
{
@@ -831,12 +825,12 @@ index 07635c8..ef2532d 100644
- if (ForFree)
- {
- retCode = SHFileOperationW(&nFileOp);
- HeapFree(GetProcessHeap(), 0, ForFree); /* we cannot use wString, it was changed */
- heap_free(ForFree); /* we cannot use wString, it was changed */
- break;
- }
- else
- {
- wString = ForFree = HeapAlloc(GetProcessHeap(), 0, size * sizeof(WCHAR));
- wString = ForFree = heap_alloc(size * sizeof(WCHAR));
- if (ForFree) continue;
- retCode = ERROR_OUTOFMEMORY;
- nFileOp.fAnyOperationsAborted = TRUE;
@@ -867,12 +861,12 @@ index 07635c8..ef2532d 100644
+ if (ForFree)
+ {
+ retCode = SHFileOperationW(&nFileOp);
+ HeapFree(GetProcessHeap(), 0, ForFree); /* we cannot use wString, it was changed */
+ heap_free(ForFree); /* we cannot use wString, it was changed */
+ break;
+ }
+ else
+ {
+ wString = ForFree = HeapAlloc(GetProcessHeap(), 0, size * sizeof(WCHAR));
+ wString = ForFree = heap_alloc(size * sizeof(WCHAR));
+ if (ForFree) continue;
+ retCode = ERROR_OUTOFMEMORY;
+ nFileOp.fAnyOperationsAborted = TRUE;
@@ -886,7 +880,7 @@ index 07635c8..ef2532d 100644
}
#define ERROR_SHELL_INTERNAL_FILE_NOT_FOUND 1026
@@ -930,7 +930,7 @@ typedef struct
@@ -926,7 +926,7 @@ typedef struct
static inline void grow_list(FILE_LIST *list)
{
FILE_ENTRY *new = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, list->feFiles,
@@ -895,16 +889,16 @@ index 07635c8..ef2532d 100644
list->feFiles = new;
list->num_alloc *= 2;
}
@@ -1022,7 +1022,7 @@ static HRESULT parse_file_list(FILE_LIST *flList, LPCWSTR szFiles)
@@ -1018,7 +1018,7 @@ static HRESULT parse_file_list(FILE_LIST *flList, LPCWSTR szFiles)
/* empty list */
if (!szFiles[0])
return ERROR_ACCESS_DENIED;
-
+
flList->feFiles = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
flList->num_alloc * sizeof(FILE_ENTRY));
flList->feFiles = heap_alloc_zero(flList->num_alloc * sizeof(FILE_ENTRY));
@@ -1126,7 +1126,7 @@ static void copy_dir_to_dir(FILE_OPERATION *op, const FILE_ENTRY *feFrom, LPCWST
while (*ptr)
@@ -1121,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 */
@@ -913,7 +907,7 @@ index 07635c8..ef2532d 100644
SHFileOperationW(&fileOp);
}
@@ -1339,7 +1339,7 @@ static int delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom)
@@ -1334,7 +1334,7 @@ static int delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom)
/* Windows also checks only the first item */
bTrash = (lpFileOp->fFlags & FOF_ALLOWUNDO)
@@ -922,7 +916,7 @@ index 07635c8..ef2532d 100644
if (!(lpFileOp->fFlags & FOF_NOCONFIRMATION) || (!bTrash && lpFileOp->fFlags & FOF_WANTNUKEWARNING))
if (!confirm_delete_list(lpFileOp->hwnd, lpFileOp->fFlags, bTrash, flFrom))
@@ -1374,11 +1374,11 @@ static int delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom)
@@ -1369,11 +1369,11 @@ static int delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom)
break;
}
}
@@ -936,7 +930,7 @@ index 07635c8..ef2532d 100644
else
ret = SHELL_DeleteDirectoryW(lpFileOp->hwnd, fileEntry->szFullPath, FALSE);
@@ -1503,8 +1503,8 @@ static int rename_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, con
@@ -1498,8 +1498,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 |
@@ -947,7 +941,7 @@ index 07635c8..ef2532d 100644
if (fFlags & wUnsupportedFlags)
FIXME("Unsupported flags: %04x\n", fFlags);
@@ -1587,19 +1587,19 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
@@ -1582,19 +1582,19 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
*/
void WINAPI SHFreeNameMappings(HANDLE hNameMapping)
{
@@ -977,7 +971,7 @@ index 07635c8..ef2532d 100644
}
/*************************************************************************
@@ -1705,14 +1705,14 @@ DWORD WINAPI SheChangeDirW(LPWSTR path)
@@ -1700,14 +1700,14 @@ DWORD WINAPI SheChangeDirW(LPWSTR path)
}
/*************************************************************************
@@ -998,5 +992,5 @@ index 07635c8..ef2532d 100644
--
2.8.0
1.9.1

View File

@@ -1,7 +1,8 @@
From 9cd5e28f85b03c762b3e78d5dd26eb2833f4d385 Mon Sep 17 00:00:00 2001
From 8102136961bf8ed57bcde4b74548562e5e3e21a0 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: shell32: Pass FILE_INFORMATION into SHNotify* functions.
Subject: [PATCH] shell32: Pass FILE_INFORMATION into SHNotify*
functions.
Preparation of the progressbar work. Based on a patch by Huw Campbell.
---
@@ -9,7 +10,7 @@ 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 ea26745..e0d9b3e 100644
index 91d5781..71de462 100644
--- a/dlls/shell32/shlfileop.c
+++ b/dlls/shell32/shlfileop.c
@@ -59,16 +59,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell);
@@ -72,7 +73,7 @@ index ea26745..e0d9b3e 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};
@@ -347,7 +373,7 @@ HRESULT WINAPI SHIsFileAvailableOffline(LPCWSTR path, LPDWORD status)
@@ -343,7 +369,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,7 +82,7 @@ index ea26745..e0d9b3e 100644
{
DWORD ret = 0;
HANDLE hFind;
@@ -357,16 +383,18 @@ static DWORD SHELL_DeleteDirectoryW(HWND hwnd, LPCWSTR pszDir, BOOL bShowUI)
@@ -353,16 +379,18 @@ static DWORD SHELL_DeleteDirectoryW(HWND hwnd, LPCWSTR pszDir, BOOL bShowUI)
PathCombineW(szTemp, pszDir, wWildcardFile);
hFind = FindFirstFileW(szTemp, &wfd);
@@ -104,7 +105,7 @@ index ea26745..e0d9b3e 100644
} while (!ret && FindNextFileW(hFind, &wfd));
}
FindClose(hFind);
@@ -497,22 +525,9 @@ BOOL WINAPI Win32RemoveDirectoryAW(LPCVOID path)
@@ -493,22 +521,9 @@ BOOL WINAPI Win32RemoveDirectoryAW(LPCVOID path)
return (SHNotifyRemoveDirectoryA(path) == ERROR_SUCCESS);
}
@@ -130,16 +131,16 @@ index ea26745..e0d9b3e 100644
{
LPWSTR wPath;
DWORD retCode;
@@ -522,7 +537,7 @@ static DWORD SHNotifyDeleteFileA(LPCSTR path)
@@ -518,7 +533,7 @@ static DWORD SHNotifyDeleteFileA(LPCSTR path)
retCode = SHELL32_AnsiToUnicodeBuf(path, &wPath, 0);
if (!retCode)
{
- retCode = SHNotifyDeleteFileW(wPath);
+ retCode = SHNotifyDeleteFileW(op, wPath);
SHELL32_FreeUnicodeBuf(wPath);
heap_free(wPath);
}
return retCode;
@@ -530,12 +545,14 @@ static DWORD SHNotifyDeleteFileA(LPCSTR path)
@@ -526,12 +541,14 @@ static DWORD SHNotifyDeleteFileA(LPCSTR path)
/***********************************************************************/
@@ -155,7 +156,7 @@ index ea26745..e0d9b3e 100644
ret = DeleteFileW(path);
if (!ret)
{
@@ -558,8 +575,8 @@ static DWORD SHNotifyDeleteFileW(LPCWSTR path)
@@ -554,8 +571,8 @@ static DWORD SHNotifyDeleteFileW(LPCWSTR path)
DWORD WINAPI Win32DeleteFileAW(LPCVOID path)
{
if (SHELL_OsIsUnicode())
@@ -166,7 +167,7 @@ index ea26745..e0d9b3e 100644
}
/************************************************************************
@@ -568,18 +585,21 @@ DWORD WINAPI Win32DeleteFileAW(LPCVOID path)
@@ -564,18 +581,21 @@ DWORD WINAPI Win32DeleteFileAW(LPCVOID path)
* Moves a file. Also triggers a change notify if one exists.
*
* PARAMS
@@ -189,7 +190,7 @@ index ea26745..e0d9b3e 100644
ret = MoveFileExW(src, dest, MOVEFILE_REPLACE_EXISTING);
/* MOVEFILE_REPLACE_EXISTING fails with dirs, so try MoveFile */
@@ -614,6 +634,7 @@ static DWORD SHNotifyMoveFileW(LPCWSTR src, LPCWSTR dest)
@@ -610,6 +630,7 @@ static DWORD SHNotifyMoveFileW(LPCWSTR src, LPCWSTR dest)
* Copies a file. Also triggers a change notify if one exists.
*
* PARAMS
@@ -197,7 +198,7 @@ index ea26745..e0d9b3e 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
@@ -622,13 +643,15 @@ static DWORD SHNotifyMoveFileW(LPCWSTR src, LPCWSTR dest)
@@ -618,13 +639,15 @@ static DWORD SHNotifyMoveFileW(LPCWSTR src, LPCWSTR dest)
* RETURNS
* ERROR_SUCCESS if successful
*/
@@ -214,7 +215,7 @@ index ea26745..e0d9b3e 100644
/* Destination file may already exist with read only attribute */
attribs = GetFileAttributesW(dest);
if (IsAttrib(attribs, FILE_ATTRIBUTE_READONLY))
@@ -904,30 +927,6 @@ int WINAPI SHFileOperationA(LPSHFILEOPSTRUCTA lpFileOp)
@@ -899,30 +922,6 @@ int WINAPI SHFileOperationA(LPSHFILEOPSTRUCTA lpFileOp)
return retCode;
}
@@ -245,7 +246,7 @@ index ea26745..e0d9b3e 100644
static inline void grow_list(FILE_LIST *list)
{
FILE_ENTRY *new = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, list->feFiles,
@@ -1091,7 +1090,7 @@ static void destroy_file_list(FILE_LIST *flList)
@@ -1085,7 +1084,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];
@@ -254,7 +255,7 @@ index ea26745..e0d9b3e 100644
static const WCHAR wildCardFiles[] = {'*','.','*',0};
@@ -1119,17 +1118,16 @@ static void copy_dir_to_dir(FILE_OPERATION *op, const FILE_ENTRY *feFrom, LPCWST
@@ -1113,17 +1112,16 @@ static void copy_dir_to_dir(FILE_OPERATION *op, const FILE_ENTRY *feFrom, LPCWST
PathCombineW(szFrom, feFrom->szFullPath, wildCardFiles);
szFrom[lstrlenW(szFrom) + 1] = '\0';
@@ -280,7 +281,7 @@ index ea26745..e0d9b3e 100644
}
static BOOL copy_file_to_file(FILE_OPERATION *op, const WCHAR *szFrom, const WCHAR *szTo)
@@ -1140,7 +1138,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 +290,7 @@ index ea26745..e0d9b3e 100644
}
/* copy a file or directory to another directory */
@@ -1180,7 +1178,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 +299,7 @@ index ea26745..e0d9b3e 100644
{
DWORD i;
const FILE_ENTRY *entryToCopy;
@@ -1203,7 +1201,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 +308,7 @@ index ea26745..e0d9b3e 100644
{
if (flFrom->bAnyFromWildcard)
return ERROR_CANCELLED;
@@ -1255,8 +1253,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 +318,7 @@ index ea26745..e0d9b3e 100644
{
fileDest = &flTo->feFiles[i];
}
@@ -1328,7 +1325,7 @@ static BOOL confirm_delete_list(HWND hWnd, DWORD fFlags, BOOL fTrash, const FILE
@@ -1322,7 +1319,7 @@ static BOOL confirm_delete_list(HWND hWnd, DWORD fFlags, BOOL fTrash, const FILE
}
/* the FO_DELETE operation */
@@ -326,7 +327,7 @@ index ea26745..e0d9b3e 100644
{
const FILE_ENTRY *fileEntry;
DWORD i;
@@ -1339,13 +1336,13 @@ static int delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom)
@@ -1333,13 +1330,13 @@ static int delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom)
return ERROR_SUCCESS;
/* Windows also checks only the first item */
@@ -344,7 +345,7 @@ index ea26745..e0d9b3e 100644
return 0;
}
@@ -1354,7 +1351,7 @@ static int delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom)
@@ -1348,7 +1345,7 @@ static int delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom)
fileEntry = &flFrom->feFiles[i];
if (!IsAttribFile(fileEntry->attributes) &&
@@ -353,7 +354,7 @@ index ea26745..e0d9b3e 100644
continue;
if (bTrash)
@@ -1364,14 +1361,14 @@ static int delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom)
@@ -1358,14 +1355,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 */
@@ -371,7 +372,7 @@ index ea26745..e0d9b3e 100644
break;
}
}
@@ -1381,7 +1378,7 @@ static int delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom)
@@ -1375,7 +1372,7 @@ static int delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom)
ret = DeleteFileW(fileEntry->szFullPath) ?
ERROR_SUCCESS : GetLastError();
else
@@ -380,7 +381,7 @@ index ea26745..e0d9b3e 100644
if (ret)
return ret;
@@ -1391,16 +1388,16 @@ static int delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom)
@@ -1385,16 +1382,16 @@ static int delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom)
}
/* moves a file or directory to another directory */
@@ -400,7 +401,7 @@ index ea26745..e0d9b3e 100644
{
DWORD i;
INT mismatched = 0;
@@ -1413,14 +1410,12 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
@@ -1407,14 +1404,12 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
if (!flTo->dwNumFiles)
return ERROR_FILE_NOT_FOUND;
@@ -417,7 +418,7 @@ index ea26745..e0d9b3e 100644
flFrom->dwNumFiles > flTo->dwNumFiles)
{
return ERROR_CANCELLED;
@@ -1433,7 +1428,7 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
@@ -1427,7 +1422,7 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
return ret;
}
@@ -426,7 +427,7 @@ index ea26745..e0d9b3e 100644
mismatched = flFrom->dwNumFiles - flTo->dwNumFiles;
fileDest = &flTo->feFiles[0];
@@ -1444,7 +1439,7 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
@@ -1438,7 +1433,7 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
if (!PathFileExistsW(fileDest->szDirectory))
return ERROR_CANCELLED;
@@ -435,7 +436,7 @@ index ea26745..e0d9b3e 100644
{
if (i >= flTo->dwNumFiles)
break;
@@ -1458,9 +1453,9 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
@@ -1452,9 +1447,9 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
}
if (fileDest->bExists && IsAttribDir(fileDest->attributes))
@@ -447,7 +448,7 @@ index ea26745..e0d9b3e 100644
}
if (mismatched > 0)
@@ -1475,7 +1470,7 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
@@ -1469,7 +1464,7 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const
}
/* the FO_RENAME files */
@@ -456,7 +457,7 @@ index ea26745..e0d9b3e 100644
{
const FILE_ENTRY *feFrom;
const FILE_ENTRY *feTo;
@@ -1497,7 +1492,7 @@ static int rename_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, con
@@ -1491,7 +1486,7 @@ static int rename_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, con
if (feTo->bExists)
return ERROR_ALREADY_EXISTS;
@@ -465,7 +466,7 @@ index ea26745..e0d9b3e 100644
}
/* alert the user if an unsupported flag is used */
@@ -1544,16 +1539,16 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
@@ -1538,16 +1533,16 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
switch (lpFileOp->wFunc)
{
case FO_COPY:
@@ -487,5 +488,5 @@ index ea26745..e0d9b3e 100644
default:
ret = ERROR_INVALID_PARAMETER;
--
2.5.0
1.9.1