MCPcopy Create free account
hub / github.com/ddnet/ddnet / ShouldSkipRequest

Method ShouldSkipRequest

src/engine/shared/http.cpp:103–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103bool CHttpRequest::ShouldSkipRequest()
104{
105 if(m_WriteToFile && m_ExpectedSha256.has_value())
106 {
107 SHA256_DIGEST Sha256;
108 if(CalculateSha256(m_aDestAbsolute, &Sha256) && Sha256 == m_ExpectedSha256.value())
109 {
110 log_debug("http", "skipping download because expected file already exists: %s", m_aDest);
111 return true;
112 }
113 }
114 return false;
115}
116
117bool CHttpRequest::BeforeInit()
118{

Callers 1

RunLoopMethod · 0.80

Calls 1

CalculateSha256Function · 0.85

Tested by

no test coverage detected