\r
// 前のファイルの処理の終了を通知。\r
this->nCurrentPos += this->piInfo.fiInfo.nUnpackedSize;\r
- this->piInfo.eMessage = TPI_MESSAGE_STATUS;\r
if (this->nCurrentPos != 0)\r
{\r
- this->piInfo.eStatus = TPI_STATUS_ENDPROCESS;\r
+ this->piInfo.eMessage = TPI_MESSAGE_STATUS;\r
+ this->piInfo.eStatus = TPI_STATUS_ENDPROCESS;\r
if (g_prProc != NULL && g_prProc(TPI_NOTIFY_COMMON, & this->piInfo) != TPI_CALLBACK_CONTINUE)\r
{\r
this->nErrorCode = TPI_ERROR_D_SKIPPED;\r
}\r
}\r
\r
- // ファイルの基本情報を取得。\r
- this->piInfo.eStatus = TPI_STATUS_BEGINPROCESS;\r
+ // ファイルを処理するか確認。\r
+ this->piInfo.eMessage = TPI_MESSAGE_ASK;\r
+ this->piInfo.eStatus = TPI_PARAM_DEST;\r
GetFileInformation2(this->hArc, & this->piInfo.fiInfo, nIndex);\r
this->piInfo.fnDestination = wxFileName(swInfo->fnDestinationDirectory.GetFullPath() + wxFileName::GetPathSeparator() + (swInfo->fStoreDirectoryPathes ? this->piInfo.fiInfo.fnFileName.GetPath() : (wxString) wxEmptyString), this->piInfo.fiInfo.fnFileName.GetFullName());\r
if (g_prProc != NULL && g_prProc(TPI_NOTIFY_COMMON, & this->piInfo) != TPI_CALLBACK_CONTINUE)\r
this->nErrorCode = TPI_ERROR_D_SKIPPED;\r
return E_ABORT;\r
}\r
+ if (! piInfo.fnDestination.IsOk())\r
+ {\r
+ return S_OK;\r
+ }\r
+\r
+ // ファイルの基本情報を取得。\r
+ this->piInfo.eMessage = TPI_MESSAGE_STATUS;\r
+ this->piInfo.eStatus = TPI_STATUS_BEGINPROCESS;\r
+ if (g_prProc != NULL && g_prProc(TPI_NOTIFY_COMMON, & this->piInfo) != TPI_CALLBACK_CONTINUE)\r
+ {\r
+ this->nErrorCode = TPI_ERROR_D_SKIPPED;\r
+ return E_ABORT;\r
+ }\r
\r
if (nExtractMode != NArchive::NExtract::NAskMode::kExtract)\r
{\r
return S_OK;\r
}\r
\r
- if (::wxFileExists(this->piInfo.fnDestination.GetFullPath()))\r
- {\r
- // 既にファイルが存在する場合。\r
- if (! ::wxRemoveFile(this->piInfo.fnDestination.GetFullPath()))\r
- {\r
- this->nErrorCode = TPI_ERROR_IO_FILE_DELETE;\r
- return E_ABORT;\r
- }\r
- }\r
-\r
+ // ファイルを作成。\r
_outFileStreamSpec = new COutFileStream;\r
CMyComPtr<ISequentialOutStream> outStreamLoc(_outFileStreamSpec);\r
- if (! _outFileStreamSpec->Open(this->piInfo.fnDestination.GetFullPath(), CREATE_ALWAYS))\r
+ if (! _outFileStreamSpec->Open(this->piInfo.fnDestination.GetFullPath(), CREATE_NEW))\r
{\r
this->nErrorCode = TPI_ERROR_IO_FILE_OPEN;\r
return E_ABORT;\r