[SHELL32] Show error message if move or copy operation failed (#4155)

This allows user to know when there is not enough space on the target media,
when there is no permissions for the operation, or some other error.

CORE-9239
This commit is contained in:
Denis Malikov 2021-12-15 21:42:47 +07:00 committed by GitHub
parent e055b0623c
commit 8ef8e41cc9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
36 changed files with 123 additions and 2 deletions

View file

@ -806,6 +806,8 @@ BEGIN
IDS_COPYERRORSAME "Cannot copy '%s': The source and destination file names are the same."
IDS_MOVEERRORSUBFOLDER "Cannot move '%s': The destination folder is a subfolder of the source folder."
IDS_COPYERRORSUBFOLDER "Cannot copy '%s': The destination folder is a subfolder of the source folder."
IDS_MOVEERROR "Cannot move '%s': %s"
IDS_COPYERROR "Cannot copy '%s': %s"
IDS_CREATEFOLDER_DENIED "Unable to create the folder '%1'"
IDS_CREATEFOLDER_CAPTION "Unable to create folder"

View file

@ -805,6 +805,8 @@ BEGIN
IDS_COPYERRORSAME "Cannot copy '%s': The source and destination file names are the same."
IDS_MOVEERRORSUBFOLDER "Cannot move '%s': The destination folder is a subfolder of the source folder."
IDS_COPYERRORSUBFOLDER "Cannot copy '%s': The destination folder is a subfolder of the source folder."
IDS_MOVEERROR "Cannot move '%s': %s"
IDS_COPYERROR "Cannot copy '%s': %s"
IDS_CREATEFOLDER_DENIED "Unable to create the folder '%1'"
IDS_CREATEFOLDER_CAPTION "Unable to create folder"

View file

@ -811,6 +811,8 @@ BEGIN
IDS_COPYERRORSAME "Cannot copy '%s': The source and destination file names are the same."
IDS_MOVEERRORSUBFOLDER "Cannot move '%s': The destination folder is a subfolder of the source folder."
IDS_COPYERRORSUBFOLDER "Cannot copy '%s': The destination folder is a subfolder of the source folder."
IDS_MOVEERROR "Cannot move '%s': %s"
IDS_COPYERROR "Cannot copy '%s': %s"
IDS_CREATEFOLDER_DENIED "Složku '%1' nebylo možné vytvořit"
IDS_CREATEFOLDER_CAPTION "Složku nebylo možné vytvořit"

View file

@ -811,6 +811,8 @@ BEGIN
IDS_COPYERRORSAME "Cannot copy '%s': The source and destination file names are the same."
IDS_MOVEERRORSUBFOLDER "Cannot move '%s': The destination folder is a subfolder of the source folder."
IDS_COPYERRORSUBFOLDER "Cannot copy '%s': The destination folder is a subfolder of the source folder."
IDS_MOVEERROR "Cannot move '%s': %s"
IDS_COPYERROR "Cannot copy '%s': %s"
IDS_CREATEFOLDER_DENIED "Unable to create the folder '%1'"
IDS_CREATEFOLDER_CAPTION "Unable to create folder"

View file

@ -806,6 +806,8 @@ BEGIN
IDS_COPYERRORSAME "'%s' kann nicht kopiert werden: Quell- und Zieldatei sind identisch."
IDS_MOVEERRORSUBFOLDER "'%s' kann nicht verschoben werden: Der Zielorder ist ein Unterordner des Quellordners."
IDS_COPYERRORSUBFOLDER "'%s' kann nicht kopiert werden: Der Zielorder ist ein Unterordner des Quellordners."
IDS_MOVEERROR "Cannot move '%s': %s"
IDS_COPYERROR "Cannot copy '%s': %s"
IDS_CREATEFOLDER_DENIED " Der Ordner kann nicht erstellt werden '%1'"
IDS_CREATEFOLDER_CAPTION " Der Ordner kann nicht erstellt werden."

View file

@ -805,6 +805,8 @@ BEGIN
IDS_COPYERRORSAME "Cannot copy '%s': The source and destination file names are the same."
IDS_MOVEERRORSUBFOLDER "Cannot move '%s': The destination folder is a subfolder of the source folder."
IDS_COPYERRORSUBFOLDER "Cannot copy '%s': The destination folder is a subfolder of the source folder."
IDS_MOVEERROR "Cannot move '%s': %s"
IDS_COPYERROR "Cannot copy '%s': %s"
IDS_CREATEFOLDER_DENIED "Unable to create the folder '%1'"
IDS_CREATEFOLDER_CAPTION "Unable to create folder"

View file

@ -805,6 +805,8 @@ BEGIN
IDS_COPYERRORSAME "Cannot copy '%s': The source and destination file names are the same."
IDS_MOVEERRORSUBFOLDER "Cannot move '%s': The destination folder is a subfolder of the source folder."
IDS_COPYERRORSUBFOLDER "Cannot copy '%s': The destination folder is a subfolder of the source folder."
IDS_MOVEERROR "Cannot move '%s': %s"
IDS_COPYERROR "Cannot copy '%s': %s"
IDS_CREATEFOLDER_DENIED "Unable to create the folder '%1'"
IDS_CREATEFOLDER_CAPTION "Unable to create folder"

View file

@ -805,6 +805,8 @@ BEGIN
IDS_COPYERRORSAME "Cannot copy '%s': The source and destination file names are the same."
IDS_MOVEERRORSUBFOLDER "Cannot move '%s': The destination folder is a subfolder of the source folder."
IDS_COPYERRORSUBFOLDER "Cannot copy '%s': The destination folder is a subfolder of the source folder."
IDS_MOVEERROR "Cannot move '%s': %s"
IDS_COPYERROR "Cannot copy '%s': %s"
IDS_CREATEFOLDER_DENIED "Unable to create the folder '%1'"
IDS_CREATEFOLDER_CAPTION "Unable to create folder"

View file

@ -814,6 +814,8 @@ BEGIN
IDS_COPYERRORSAME "Imposible copiar '%s': El archivo de origen y el de destino son el mismo."
IDS_MOVEERRORSUBFOLDER "Imposible mover '%s': La carpeta de destino es un subdirectorio de la de origen."
IDS_COPYERRORSUBFOLDER "Imposible copiar '%s': La carpeta de destino es un subdirectorio de la de origen."
IDS_MOVEERROR "Cannot move '%s': %s"
IDS_COPYERROR "Cannot copy '%s': %s"
IDS_CREATEFOLDER_DENIED "No se pudo crear la carpeta '%1'"
IDS_CREATEFOLDER_CAPTION "No se pudo crear la carpeta"

View file

@ -812,6 +812,8 @@ BEGIN
IDS_COPYERRORSAME "Cannot copy '%s': The source and destination file names are the same."
IDS_MOVEERRORSUBFOLDER "Cannot move '%s': The destination folder is a subfolder of the source folder."
IDS_COPYERRORSUBFOLDER "Cannot copy '%s': The destination folder is a subfolder of the source folder."
IDS_MOVEERROR "Cannot move '%s': %s"
IDS_COPYERROR "Cannot copy '%s': %s"
IDS_CREATEFOLDER_DENIED "Ei saa luua kausta '%1'"
IDS_CREATEFOLDER_CAPTION "Ei saa kausta luua"

View file

@ -805,6 +805,8 @@ BEGIN
IDS_COPYERRORSAME "Cannot copy '%s': The source and destination file names are the same."
IDS_MOVEERRORSUBFOLDER "Cannot move '%s': The destination folder is a subfolder of the source folder."
IDS_COPYERRORSUBFOLDER "Cannot copy '%s': The destination folder is a subfolder of the source folder."
IDS_MOVEERROR "Cannot move '%s': %s"
IDS_COPYERROR "Cannot copy '%s': %s"
IDS_CREATEFOLDER_DENIED "Unable to create the folder '%1'"
IDS_CREATEFOLDER_CAPTION "Unable to create folder"

View file

@ -805,6 +805,8 @@ BEGIN
IDS_COPYERRORSAME "Impossible de copier '%s' : Les noms des fichiers source et destination sont identiques."
IDS_MOVEERRORSUBFOLDER "Impossible de déplacer '%s' : Le dossier de destination est un sous-dossier du dossier source."
IDS_COPYERRORSUBFOLDER "Impossible de copier '%s' : Le dossier de destination est un sous-dossier du dossier source."
IDS_MOVEERROR "Cannot move '%s': %s"
IDS_COPYERROR "Cannot copy '%s': %s"
IDS_CREATEFOLDER_DENIED "Impossible de créer le dossier '%1'"
IDS_CREATEFOLDER_CAPTION "Impossible de créer un dossier"

View file

@ -807,6 +807,8 @@ BEGIN
IDS_COPYERRORSAME "Cannot copy '%s': The source and destination file names are the same."
IDS_MOVEERRORSUBFOLDER "Cannot move '%s': The destination folder is a subfolder of the source folder."
IDS_COPYERRORSUBFOLDER "Cannot copy '%s': The destination folder is a subfolder of the source folder."
IDS_MOVEERROR "Cannot move '%s': %s"
IDS_COPYERROR "Cannot copy '%s': %s"
IDS_CREATEFOLDER_DENIED "Unable to create the folder '%1'"
IDS_CREATEFOLDER_CAPTION "Unable to create folder"

View file

@ -805,6 +805,8 @@ BEGIN
IDS_COPYERRORSAME "Cannot copy '%s': The source and destination file names are the same."
IDS_MOVEERRORSUBFOLDER "Cannot move '%s': The destination folder is a subfolder of the source folder."
IDS_COPYERRORSUBFOLDER "Cannot copy '%s': The destination folder is a subfolder of the source folder."
IDS_MOVEERROR "Cannot move '%s': %s"
IDS_COPYERROR "Cannot copy '%s': %s"
IDS_CREATEFOLDER_DENIED "फ़ोल्डर '%1' बनाने में असमर्थ"
IDS_CREATEFOLDER_CAPTION "फ़ोल्डर बनाने में असमर्थ"

View file

@ -804,6 +804,8 @@ BEGIN
IDS_COPYERRORSAME "'%s' nem másolható: a forrás- és célfájl ugyanaz."
IDS_MOVEERRORSUBFOLDER "'%s' nem mozgatható: a célmappa a forrásmappa egyik almappája."
IDS_COPYERRORSUBFOLDER "'%s' nem másolható: a célmappa a forrásmappa egyik almappája."
IDS_MOVEERROR "Cannot move '%s': %s"
IDS_COPYERROR "Cannot copy '%s': %s"
IDS_CREATEFOLDER_DENIED "Nem sikerült a(z) '%1' mappa létrehozása."
IDS_CREATEFOLDER_CAPTION "Nem sikerült létrehozni a mappát"

View file

@ -802,6 +802,8 @@ BEGIN
IDS_COPYERRORSAME "Tidak bisa menyalin '%s': Nama berkas asal dan tujuan sama."
IDS_MOVEERRORSUBFOLDER "Tidak bisa memindahkan '%s': Folder tujuan merupakan subfolder dari folder asal."
IDS_COPYERRORSUBFOLDER "Tidak bisa menyalin '%s': Folder tujuan merupakan subfolder dari folder asal."
IDS_MOVEERROR "Cannot move '%s': %s"
IDS_COPYERROR "Cannot copy '%s': %s"
IDS_CREATEFOLDER_DENIED "Tidak bisa membuat folder folder '%1'"
IDS_CREATEFOLDER_CAPTION "Tidak bisa membuat folder"

View file

@ -805,6 +805,8 @@ BEGIN
IDS_COPYERRORSAME "Cannot copy '%s': The source and destination file names are the same."
IDS_MOVEERRORSUBFOLDER "Cannot move '%s': The destination folder is a subfolder of the source folder."
IDS_COPYERRORSUBFOLDER "Cannot copy '%s': The destination folder is a subfolder of the source folder."
IDS_MOVEERROR "Cannot move '%s': %s"
IDS_COPYERROR "Cannot copy '%s': %s"
IDS_CREATEFOLDER_DENIED "Unable to create the folder '%1'"
IDS_CREATEFOLDER_CAPTION "Unable to create folder"

View file

@ -802,6 +802,8 @@ BEGIN
IDS_COPYERRORSAME "コピーできません '%s': コピー元とコピー先のファイル名が同じです。"
IDS_MOVEERRORSUBFOLDER "移動できません '%s': 移動先のフォルダは移動元のフォルダのサブフォルダです。"
IDS_COPYERRORSUBFOLDER "コピーできません '%s': コピー先のフォルダはコピー元のフォルダのサブフォルダです。"
IDS_MOVEERROR "Cannot move '%s': %s"
IDS_COPYERROR "Cannot copy '%s': %s"
IDS_CREATEFOLDER_DENIED "フォルダ '%1' を作成できません"
IDS_CREATEFOLDER_CAPTION "フォルダを作成できません"

View file

@ -805,6 +805,8 @@ BEGIN
IDS_COPYERRORSAME "Cannot copy '%s': The source and destination file names are the same."
IDS_MOVEERRORSUBFOLDER "Cannot move '%s': The destination folder is a subfolder of the source folder."
IDS_COPYERRORSUBFOLDER "Cannot copy '%s': The destination folder is a subfolder of the source folder."
IDS_MOVEERROR "Cannot move '%s': %s"
IDS_COPYERROR "Cannot copy '%s': %s"
IDS_CREATEFOLDER_DENIED "Unable to create the folder '%1'"
IDS_CREATEFOLDER_CAPTION "Unable to create folder"

View file

@ -805,6 +805,8 @@ BEGIN
IDS_COPYERRORSAME "Cannot copy '%s': The source and destination file names are the same."
IDS_MOVEERRORSUBFOLDER "Cannot move '%s': The destination folder is a subfolder of the source folder."
IDS_COPYERRORSUBFOLDER "Cannot copy '%s': The destination folder is a subfolder of the source folder."
IDS_MOVEERROR "Cannot move '%s': %s"
IDS_COPYERROR "Cannot copy '%s': %s"
IDS_CREATEFOLDER_DENIED "Unable to create the folder '%1'"
IDS_CREATEFOLDER_CAPTION "Unable to create folder"

View file

@ -805,6 +805,8 @@ BEGIN
IDS_COPYERRORSAME "Cannot copy '%s': The source and destination file names are the same."
IDS_MOVEERRORSUBFOLDER "Cannot move '%s': The destination folder is a subfolder of the source folder."
IDS_COPYERRORSUBFOLDER "Cannot copy '%s': The destination folder is a subfolder of the source folder."
IDS_MOVEERROR "Cannot move '%s': %s"
IDS_COPYERROR "Cannot copy '%s': %s"
IDS_CREATEFOLDER_DENIED "Unable to create the folder '%1'"
IDS_CREATEFOLDER_CAPTION "Unable to create folder"

View file

@ -811,6 +811,8 @@ BEGIN
IDS_COPYERRORSAME "Nie można skopiować '%s': Nazwy plików źródłowego i docelowego są takie same."
IDS_MOVEERRORSUBFOLDER "Nie można przenieść '%s': Folder docelowy jest podfolderem folderu źródłowego."
IDS_COPYERRORSUBFOLDER "Nie można skopiować '%s': Folder docelowy jest podfolderem folderu źródłowego."
IDS_MOVEERROR "Cannot move '%s': %s"
IDS_COPYERROR "Cannot copy '%s': %s"
IDS_CREATEFOLDER_DENIED "Nie można utworzyć folderu '%1'"
IDS_CREATEFOLDER_CAPTION "Nie można utworzyć folderu"

View file

@ -805,6 +805,8 @@ BEGIN
IDS_COPYERRORSAME "Cannot copy '%s': The source and destination file names are the same."
IDS_MOVEERRORSUBFOLDER "Cannot move '%s': The destination folder is a subfolder of the source folder."
IDS_COPYERRORSUBFOLDER "Cannot copy '%s': The destination folder is a subfolder of the source folder."
IDS_MOVEERROR "Cannot move '%s': %s"
IDS_COPYERROR "Cannot copy '%s': %s"
IDS_CREATEFOLDER_DENIED "Unable to create the folder '%1'"
IDS_CREATEFOLDER_CAPTION "Unable to create folder"

View file

@ -805,6 +805,8 @@ BEGIN
IDS_COPYERRORSAME "Impossivel copiar '%s': Os nomes dos arquivos de origem e de destino são os mesmos."
IDS_MOVEERRORSUBFOLDER "Impossivel mover '%s': A pasta de destino é uma subpasta da pasta de origem."
IDS_COPYERRORSUBFOLDER "Impossivel copiar '%s': A pasta de destino é uma subpasta da pasta de origem."
IDS_MOVEERROR "Cannot move '%s': %s"
IDS_COPYERROR "Cannot copy '%s': %s"
IDS_CREATEFOLDER_DENIED "Impossivel criar pasta '%1'"
IDS_CREATEFOLDER_CAPTION "Impossivel criar pasta"

View file

@ -807,6 +807,8 @@ BEGIN
IDS_COPYERRORSAME "Cannot copy '%s': The source and destination file names are the same."
IDS_MOVEERRORSUBFOLDER "Cannot move '%s': The destination folder is a subfolder of the source folder."
IDS_COPYERRORSUBFOLDER "Cannot copy '%s': The destination folder is a subfolder of the source folder."
IDS_MOVEERROR "Cannot move '%s': %s"
IDS_COPYERROR "Cannot copy '%s': %s"
IDS_CREATEFOLDER_DENIED "Nu poate fi creat un dosar cu numele „%1”"
IDS_CREATEFOLDER_CAPTION "Nu poate fi creat dosar"

View file

@ -805,13 +805,15 @@ BEGIN
IDS_OPENFILELOCATION "Открыть &расположение объекта"
IDS_SENDTO_MENU "Отправит&ь"
IDS_MOVEERRORTITLE "Error Moving File or Folder"
IDS_COPYERRORTITLE "Error Copying File or Folder"
IDS_MOVEERRORTITLE "Ошибка при перемещении папки или файла"
IDS_COPYERRORTITLE "Ошибка при копировании папки или файла"
IDS_MOVEERRORSAMEFOLDER "Cannot move '%s': The destination folder is the same as the source folder."
IDS_MOVEERRORSAME "Cannot move '%s': The source and destination file names are the same."
IDS_COPYERRORSAME "Cannot copy '%s': The source and destination file names are the same."
IDS_MOVEERRORSUBFOLDER "Cannot move '%s': The destination folder is a subfolder of the source folder."
IDS_COPYERRORSUBFOLDER "Cannot copy '%s': The destination folder is a subfolder of the source folder."
IDS_MOVEERROR "Не удаётся переместить '%s': %s"
IDS_COPYERROR "Не удаётся скопировать '%s': %s"
IDS_CREATEFOLDER_DENIED "Невозможно создать папку '%1'"
IDS_CREATEFOLDER_CAPTION "Невозможно создать папку"

View file

@ -805,6 +805,8 @@ BEGIN
IDS_COPYERRORSAME "Cannot copy '%s': The source and destination file names are the same."
IDS_MOVEERRORSUBFOLDER "Cannot move '%s': The destination folder is a subfolder of the source folder."
IDS_COPYERRORSUBFOLDER "Cannot copy '%s': The destination folder is a subfolder of the source folder."
IDS_MOVEERROR "Cannot move '%s': %s"
IDS_COPYERROR "Cannot copy '%s': %s"
IDS_CREATEFOLDER_DENIED "Unable to create the folder '%1'"
IDS_CREATEFOLDER_CAPTION "Unable to create folder"

View file

@ -805,6 +805,8 @@ BEGIN
IDS_COPYERRORSAME "Cannot copy '%s': The source and destination file names are the same."
IDS_MOVEERRORSUBFOLDER "Cannot move '%s': The destination folder is a subfolder of the source folder."
IDS_COPYERRORSUBFOLDER "Cannot copy '%s': The destination folder is a subfolder of the source folder."
IDS_MOVEERROR "Cannot move '%s': %s"
IDS_COPYERROR "Cannot copy '%s': %s"
IDS_CREATEFOLDER_DENIED "Unable to create the folder '%1'"
IDS_CREATEFOLDER_CAPTION "Unable to create folder"

View file

@ -809,6 +809,8 @@ BEGIN
IDS_COPYERRORSAME "Cannot copy '%s': The source and destination file names are the same."
IDS_MOVEERRORSUBFOLDER "Cannot move '%s': The destination folder is a subfolder of the source folder."
IDS_COPYERRORSUBFOLDER "Cannot copy '%s': The destination folder is a subfolder of the source folder."
IDS_MOVEERROR "Cannot move '%s': %s"
IDS_COPYERROR "Cannot copy '%s': %s"
IDS_CREATEFOLDER_DENIED "Unable to create the folder '%1'"
IDS_CREATEFOLDER_CAPTION "Unable to create folder"

View file

@ -805,6 +805,8 @@ BEGIN
IDS_COPYERRORSAME "Cannot copy '%s': The source and destination file names are the same."
IDS_MOVEERRORSUBFOLDER "Cannot move '%s': The destination folder is a subfolder of the source folder."
IDS_COPYERRORSUBFOLDER "Cannot copy '%s': The destination folder is a subfolder of the source folder."
IDS_MOVEERROR "Cannot move '%s': %s"
IDS_COPYERROR "Cannot copy '%s': %s"
IDS_CREATEFOLDER_DENIED "Kunde inte skapa mappen '%1'"
IDS_CREATEFOLDER_CAPTION "Kunde inte skapa mapp"

View file

@ -807,6 +807,8 @@ BEGIN
IDS_COPYERRORSAME "'%s' kopyalanamıyor: Kaynak ve hedef dosya adları aynı."
IDS_MOVEERRORSUBFOLDER "'%s' taşınamıyor: Hedef dizin, kaynak dizinin bir alt dizinidir."
IDS_COPYERRORSUBFOLDER "'%s' kopyalanamıyor: Hedef dizin, kaynak dizinin bir alt dizinidir."
IDS_MOVEERROR "Cannot move '%s': %s"
IDS_COPYERROR "Cannot copy '%s': %s"
IDS_CREATEFOLDER_DENIED """%1"" dizini oluşturulamıyor."
IDS_CREATEFOLDER_CAPTION "Dizin Oluşturulamıyor"

View file

@ -805,6 +805,8 @@ BEGIN
IDS_COPYERRORSAME "Cannot copy '%s': The source and destination file names are the same."
IDS_MOVEERRORSUBFOLDER "Cannot move '%s': The destination folder is a subfolder of the source folder."
IDS_COPYERRORSUBFOLDER "Cannot copy '%s': The destination folder is a subfolder of the source folder."
IDS_MOVEERROR "Cannot move '%s': %s"
IDS_COPYERROR "Cannot copy '%s': %s"
IDS_CREATEFOLDER_DENIED "Не вдалося створити папку '%1'"
IDS_CREATEFOLDER_CAPTION "Не вдалося створити папку"

View file

@ -813,6 +813,8 @@ BEGIN
IDS_COPYERRORSAME "Cannot copy '%s': The source and destination file names are the same."
IDS_MOVEERRORSUBFOLDER "Cannot move '%s': The destination folder is a subfolder of the source folder."
IDS_COPYERRORSUBFOLDER "Cannot copy '%s': The destination folder is a subfolder of the source folder."
IDS_MOVEERROR "Cannot move '%s': %s"
IDS_COPYERROR "Cannot copy '%s': %s"
IDS_CREATEFOLDER_DENIED "无法创建文件夹 '%1'"
IDS_CREATEFOLDER_CAPTION "无法创建文件夹"

View file

@ -813,6 +813,8 @@ BEGIN
IDS_COPYERRORSAME "無法複製「%s」來源及目的地的檔案名稱相同。"
IDS_MOVEERRORSUBFOLDER "無法移動「%s」目的資料夾是來源資料夾的子資料夾。"
IDS_COPYERRORSUBFOLDER "無法複製「%s」目的資料夾是來源資料夾的子資料夾。"
IDS_MOVEERROR "Cannot move '%s': %s"
IDS_COPYERROR "Cannot copy '%s': %s"
IDS_CREATEFOLDER_DENIED "無法建立資料夾「%1」"
IDS_CREATEFOLDER_CAPTION "無法建立資料夾"

View file

@ -663,6 +663,48 @@ EXTERN_C DWORD WINAPI Win32DeleteFileW(LPCWSTR path)
return (SHNotifyDeleteFileW(NULL, path) == ERROR_SUCCESS);
}
#ifdef __REACTOS__
/************************************************************************
* CheckForError [internal]
*
* Show message box if operation failed
*
* PARAMS
* op [I] File Operation context
* error [I] Error code
* src [I] Source file full name
*
*/
static DWORD CheckForError(FILE_OPERATION *op, DWORD error, LPCWSTR src)
{
CStringW strTitle, strMask, strText;
LPWSTR lpMsgBuffer;
if (error == ERROR_SUCCESS || (op->req->fFlags & (FOF_NOERRORUI | FOF_SILENT)))
goto exit;
strTitle.LoadStringW(op->req->wFunc == FO_COPY ? IDS_COPYERRORTITLE : IDS_MOVEERRORTITLE);
FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
error,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPWSTR)&lpMsgBuffer,
0,
NULL);
strText.Format(op->req->wFunc == FO_COPY ? IDS_COPYERROR : IDS_MOVEERROR,
PathFindFileNameW(src),
lpMsgBuffer);
MessageBoxW(op->req->hwnd, strText, strTitle, MB_ICONERROR);
LocalFree(lpMsgBuffer);
exit:
return error;
}
#endif
/************************************************************************
* SHNotifyMoveFile [internal]
*
@ -710,7 +752,12 @@ static DWORD SHNotifyMoveFileW(FILE_OPERATION *op, LPCWSTR src, LPCWSTR dest, BO
SHChangeNotify(isdir ? SHCNE_RMDIR : SHCNE_DELETE, SHCNF_PATHW, src, NULL);
return ERROR_SUCCESS;
}
#ifdef __REACTOS__
return CheckForError(op, GetLastError(), src);
#else
return GetLastError();
#endif
}
/************************************************************************
@ -757,7 +804,11 @@ static DWORD SHNotifyCopyFileW(FILE_OPERATION *op, LPCWSTR src, LPCWSTR dest, BO
return ERROR_SUCCESS;
}
#ifdef __REACTOS__
return CheckForError(op, GetLastError(), src);
#else
return GetLastError();
#endif
}
/*************************************************************************

View file

@ -250,6 +250,8 @@
#define IDS_COPYERRORSAME 348
#define IDS_MOVEERRORSUBFOLDER 349
#define IDS_COPYERRORSUBFOLDER 350
#define IDS_MOVEERROR 351
#define IDS_COPYERROR 352
#define IDS_MENU_EMPTY 34561