mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Implement removal of user data files.
This commit is contained in:
parent
9d0316342d
commit
c2f38d0db7
@ -151,4 +151,11 @@ FILE* UserData::OpenFile( const char* filename, bool write )
|
||||
return f;
|
||||
}
|
||||
|
||||
void UserData::Remove( const char* filename )
|
||||
{
|
||||
const auto path = GetSavePath( m_program.c_str(), m_time, filename, false );
|
||||
if( !path ) return;
|
||||
unlink( path );
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ public:
|
||||
|
||||
private:
|
||||
FILE* OpenFile( const char* filename, bool write );
|
||||
void Remove( const char* filename );
|
||||
|
||||
std::string m_program;
|
||||
uint64_t m_time;
|
||||
|
Loading…
Reference in New Issue
Block a user