- nErrorCode =\r
- ErrorCodeConvert(\r
- ((int (__stdcall *)(void *, int, wchar_t *, wchar_t *)) pP)(\r
- hArc,\r
- (_szFiles.GetCount() != 0 && _szFiles.Index(wxString(hdInfo.FileNameW)) == wxNOT_FOUND) ? RAR_SKIP : _uCommand == TPI_COMMAND_EXTRACT ? RAR_EXTRACT : RAR_TEST,\r
- _swInfo->fStoreDirectoryPathes ? _swInfo->fnDestinationDirectory.GetFullPath().wchar_str() : NULL,\r
- _swInfo->fStoreDirectoryPathes ? NULL : (_swInfo->fnDestinationDirectory.GetPathWithSep() + wxFileName(hdInfo.FileNameW).GetFullName()).wchar_str()\r
- )\r
- );\r
+ piInfo.fiInfo.fnFileName = wxFileName(WC2String(hdInfo.FileNameW));\r
+ piInfo.fnDestination = wxFileName(_swInfo->fnDestinationDirectory.GetPathWithSep() + (_swInfo->fStoreDirectoryPathes ? piInfo.fiInfo.fnFileName.GetFullPath() : piInfo.fiInfo.fnFileName.GetFullName()));\r
+ bool bSkip = _szFiles.GetCount() != 0 && _szFiles.Index(piInfo.fiInfo.fnFileName.GetFullPath()) == wxNOT_FOUND;\r
+ if (! bSkip && _eCommand == TPI_COMMAND_EXTRACT)\r
+ {\r
+ // 処理するかどうか確認。\r
+ piInfo.eMessage = TPI_MESSAGE_ASK;\r
+ piInfo.eStatus = TPI_PARAM_DEST;\r
+ piInfo.fiInfo.nUnpackedSize = hdInfo.UnpSizeHigh;\r
+ piInfo.fiInfo.nUnpackedSize = piInfo.fiInfo.nUnpackedSize << 32;\r
+ piInfo.fiInfo.nUnpackedSize += hdInfo.UnpSize;\r
+ piInfo.fiInfo.tmModify.SetFromDOS(hdInfo.FileTime);\r
+ if (g_prProc != NULL && g_prProc(TPI_NOTIFY_COMMON, & piInfo) != TPI_CALLBACK_CONTINUE)\r
+ {\r
+ nErrorCode = TPI_ERROR_D_SKIPPED;\r
+ break;\r
+ }\r
+ bSkip = ! piInfo.fnDestination.IsOk();\r
+ }\r
+\r
+ if (! bSkip)\r
+ {\r
+ // 処理の開始を通知。\r
+ piInfo.eMessage = TPI_MESSAGE_STATUS;\r
+ piInfo.eStatus = TPI_STATUS_BEGINPROCESS;\r
+ if (g_prProc != NULL && g_prProc(TPI_NOTIFY_COMMON, & piInfo) != TPI_CALLBACK_CONTINUE)\r
+ {\r
+ nErrorCode = TPI_ERROR_D_SKIPPED;\r
+ break;\r
+ }\r
+ }\r
+\r
+ nErrorCode = ErrorCodeConvert(((int (__stdcall *)(void *, int, wchar_t *, wchar_t *)) pP)(hArc, bSkip ? RAR_SKIP : _eCommand == TPI_COMMAND_EXTRACT ? RAR_EXTRACT : RAR_TEST, NULL, piInfo.fnDestination.GetFullPath().wchar_str()));\r
+\r
+ if (! bSkip)\r
+ {\r
+ // 処理の終了を通知。\r
+ piInfo.eMessage = TPI_MESSAGE_STATUS;\r
+ piInfo.eStatus = TPI_STATUS_ENDPROCESS;\r
+ if (g_prProc != NULL && g_prProc(TPI_NOTIFY_COMMON, & piInfo) != TPI_CALLBACK_CONTINUE)\r
+ {\r
+ nErrorCode = TPI_ERROR_D_SKIPPED;\r
+ break;\r
+ }\r
+ }\r