}\r
\r
// Initialization.\r
+ _fiInfo->eDanger = 0;\r
+ _fiInfo->eOSType = 0;\r
+ _fiInfo->wCompressRatio = 0;\r
+ _fiInfo->wPermission = 0644;\r
_fiInfo->dwAttribute = 0;\r
_fiInfo->dwCRC32 = 0;\r
_fiInfo->tmAccess = 0;\r
_fiInfo->tmCreate = 0;\r
_fiInfo->tmModified = 0;\r
- _fiInfo->eDanger = 0;\r
- _fiInfo->eOSType = 0;\r
_fiInfo->nPackedSize = 0;\r
_fiInfo->nUnpackedSize = 0;\r
_fiInfo->fnFileName.Clear();\r
_fiInfo->szStoredName.Empty();\r
_fiInfo->szMethod.Empty();\r
_fiInfo->szComment.Empty();\r
- _fiInfo->wCompressRatio = 0;\r
+ _fiInfo->szUser.Empty();\r
+ _fiInfo->szGroup.Empty();\r
_fiInfo->nFileId = 0;\r
_fiInfo->pCustomInfo = NULL;\r
\r
unsigned short eDanger; /**< セキュリティ警告 */\r
unsigned short eOSType; /**< 作成元OS */\r
unsigned short wCompressRatio; /**< 圧縮率 */\r
+ unsigned short wPermission; /**< パーミッション */\r
/** 属性 */\r
/** @sa c_file_attribute */\r
unsigned long dwAttribute;\r
wxString szStoredName; /**< 格納された名前 */\r
wxString szMethod; /**< 格納メソッド */\r
wxString szComment; /**< コメント */\r
+ wxString szUser; /**< ユーザ */\r
+ wxString szGroup; /**< グループ */\r
void * pCustomInfo; /**< 任意の情報を格納 */\r
} TPI_FILEINFO;\r
\r
{\r
_fiInfo->dwAttribute |= TPI_ATTRIBUTE_DIRECTORY;\r
}\r
+ hArc->GetProperty(nIndex, kpidPosixAttrib, & prop);\r
+ _fiInfo->wPermission = prop.vt == VT_EMPTY ? 0644 : prop.uintVal;\r
+ hArc->GetProperty(nIndex, kpidEncrypted, & prop);\r
+ if (prop.vt == VT_BOOL && VARIANT_BOOLToBool(prop.boolVal))\r
+ {\r
+ _fiInfo->dwAttribute |= TPI_ATTRIBUTE_ENCRYPTED;\r
+ }\r
hArc->GetProperty(nIndex, kpidCRC, & prop);\r
_fiInfo->dwCRC32 = prop.ulVal;\r
hArc->GetProperty(nIndex, kpidPackSize, & prop);\r
_fiInfo->szStoredName = wxT("data") + (prop.vt == VT_BSTR ? wxT(".") + WC2String(prop.bstrVal) : (wxString) wxEmptyString);\r
}\r
_fiInfo->fnFileName = wxFileName(_fiInfo->szStoredName, wxPATH_DOS);\r
- hArc->GetProperty(nIndex, kpidMethod, & prop);\r
- if (prop.vt == VT_BSTR)\r
- {\r
- _fiInfo->szMethod = WC2String(prop.bstrVal);\r
- }\r
- hArc->GetProperty(nIndex, kpidComment, & prop);\r
- if (prop.vt == VT_BSTR)\r
- {\r
- _fiInfo->szComment = WC2String(prop.bstrVal);\r
- }\r
+ hArc->GetProperty(nIndex, kpidMethod, & prop); _fiInfo->szMethod = prop.vt == VT_BSTR ? WC2String(prop.bstrVal) : (wxString) wxEmptyString;\r
+ hArc->GetProperty(nIndex, kpidComment, & prop); _fiInfo->szComment = prop.vt == VT_BSTR ? WC2String(prop.bstrVal) : (wxString) wxEmptyString;\r
+ hArc->GetProperty(nIndex, kpidUser, & prop); _fiInfo->szUser = prop.vt == VT_BSTR ? WC2String(prop.bstrVal) : (wxString) wxEmptyString;\r
+ hArc->GetProperty(nIndex, kpidComment, & prop); _fiInfo->szGroup = prop.vt == VT_BSTR ? WC2String(prop.bstrVal) : (wxString) wxEmptyString;\r
_fiInfo->nFileId = nIndex;\r
return TPI_ERROR_SUCCESS;\r
}\r
if (this->nMode == NArchive::NExtract::NAskMode::kExtract)\r
{\r
NWindows::NFile::NDirectory::MySetFileAttributes(this->piInfo.fnDestination.GetFullPath(), this->piInfo.fiInfo.dwAttribute);\r
+#ifdef __LINUX__\r
+ _wchmod(this->piInfo.fnDestination.GetFullPath().c_str());\r
+#endif\r
}\r
\r
return S_OK;\r