| 87 | } |
| 88 | |
| 89 | static FNFDINOTIFY(CabFDINotify) |
| 90 | { |
| 91 | CabFile* cabFile = (CabFile*)pfdin->pv; |
| 92 | |
| 93 | switch (fdint) |
| 94 | { |
| 95 | case fdintCOPY_FILE: |
| 96 | { |
| 97 | String destName = cabFile->mDestDir; |
| 98 | destName += "/"; |
| 99 | destName += pfdin->psz1; |
| 100 | int fh = (int)CabFileOpen((LPSTR)destName.c_str(), _O_BINARY | _O_CREAT | _O_WRONLY | _O_SEQUENTIAL, |
| 101 | _S_IREAD | _S_IWRITE); |
| 102 | if (fh == -1) |
| 103 | cabFile->Fail(StrFormat("Failed to create '%s'", destName.c_str())); |
| 104 | return fh; |
| 105 | } |
| 106 | case fdintCLOSE_FILE_INFO: |
| 107 | CabFileClose(pfdin->hf); |
| 108 | return TRUE; |
| 109 | default: |
| 110 | break; |
| 111 | } |
| 112 | return 0; |
| 113 | } |
| 114 | |
| 115 | void CabFile::Fail(const StringImpl& err) |
| 116 | { |