mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
User data directory location getter.
This commit is contained in:
+10
-4
@@ -117,7 +117,6 @@ const char* GetSavePath( const char* file )
|
||||
|
||||
const char* GetSavePath( const char* program, uint64_t time, const char* file, bool create )
|
||||
{
|
||||
assert( file && *file );
|
||||
assert( program && *program );
|
||||
|
||||
enum { Pool = 8 };
|
||||
@@ -195,9 +194,16 @@ const char* GetSavePath( const char* program, uint64_t time, const char* file, b
|
||||
assert( status );
|
||||
}
|
||||
|
||||
const auto fsz = strlen( file );
|
||||
assert( sz + fsz < MaxPath );
|
||||
memcpy( buf+sz, file, fsz+1 );
|
||||
if( file )
|
||||
{
|
||||
const auto fsz = strlen( file );
|
||||
assert( sz + fsz < MaxPath );
|
||||
memcpy( buf+sz, file, fsz+1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
buf[sz] = '\0';
|
||||
}
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user