DemoRecorder: Only remove existing filenames

As noticed by Jupstar
This commit is contained in:
def 2020-11-12 14:53:38 +01:00
parent 11d5e87047
commit 8c4beb987c
2 changed files with 3 additions and 2 deletions

View file

@ -3873,7 +3873,8 @@ void CClient::DemoRecorder_Stop(int Recorder, bool RemoveFile)
if(RemoveFile)
{
const char *pFilename = (&m_DemoRecorder[Recorder])->GetCurrentFilename();
Storage()->RemoveFile(pFilename, IStorage::TYPE_SAVE);
if(pFilename[0] != '\0')
Storage()->RemoveFile(pFilename, IStorage::TYPE_SAVE);
}
}

View file

@ -481,7 +481,7 @@ public:
bool Success = !fs_remove(aBuffer);
if(!Success)
dbg_msg("storage", "failed to remove: %s", aBuffer);
dbg_msg("storage", "failed to remove binary: %s", aBuffer);
return Success;
}