mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
DemoRecorder: Only remove existing filenames
As noticed by Jupstar
This commit is contained in:
parent
11d5e87047
commit
8c4beb987c
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue