1
0
This commit is contained in:
Scott E. Graves
2017-02-13 21:56:52 -06:00
parent 885e5eadb7
commit 166d823434

View File

@@ -224,11 +224,10 @@ private:
{
if (isReplaceOp)
{
// Since this is a request to replace existing file, so make sure cache is deleted first.
// Since this is a request to replace an existing file, make sure cache is deleted first.
// If file isn't cached, delete from Sia only
if (!PathFileExists(cacheFilePath.c_str()) || ::DeleteFile(cacheFilePath.c_str()))
{
// Delete from Sia since this file will be replaced
if (!API_SUCCESS(SiaApiError, _siaApi->GetRenter()->DeleteFile(siaPath)))
{
ret = STATUS_INVALID_SERVER_STATE;