mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-14 03:58:18 +00:00
Catch an IO error
This commit is contained in:
parent
bb88034def
commit
0024a4370c
|
@ -100,6 +100,12 @@ void CFetcher::FetchFile(CFetchTask *pTask)
|
||||||
m_pStorage->GetCompletePath(pTask->m_StorageType, pTask->m_pDest, aPath, sizeof(aPath));
|
m_pStorage->GetCompletePath(pTask->m_StorageType, pTask->m_pDest, aPath, sizeof(aPath));
|
||||||
IOHANDLE File = io_open(aPath, IOFLAG_WRITE);
|
IOHANDLE File = io_open(aPath, IOFLAG_WRITE);
|
||||||
|
|
||||||
|
if(!File){
|
||||||
|
dbg_msg("fetcher", "I/O Error cannot open file: %s", pTask->m_pDest);
|
||||||
|
pTask->m_State = CFetchTask::STATE_ERROR;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
char aCAFile[512];
|
char aCAFile[512];
|
||||||
m_pStorage->GetBinaryPath("data/ca-ddnet.pem", aCAFile, sizeof aCAFile);
|
m_pStorage->GetBinaryPath("data/ca-ddnet.pem", aCAFile, sizeof aCAFile);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue