MCPcopy Create free account
hub / github.com/beefytech/Beef / FNFDINOTIFY

Function FNFDINOTIFY

BeefySysLib/util/CabUtil.cpp:89–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87}
88
89static 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
115void CabFile::Fail(const StringImpl& err)
116{

Callers

nothing calls this directly

Calls 2

c_strMethod · 0.45
FailMethod · 0.45

Tested by

no test coverage detected