mirror of
https://github.com/wolfpld/tracy
synced 2025-04-30 04:43:53 +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;
|
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:
|
private:
|
||||||
FILE* OpenFile( const char* filename, bool write );
|
FILE* OpenFile( const char* filename, bool write );
|
||||||
|
void Remove( const char* filename );
|
||||||
|
|
||||||
std::string m_program;
|
std::string m_program;
|
||||||
uint64_t m_time;
|
uint64_t m_time;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user