refactor: roster export uses GString and g_file_set_contents now
Modernize the /export command implementation by adopting GLib-based patterns for string manipulation and file handling. * Replace _writecsv with _append_csv_escaped to efficiently handle CSV quote doubling directly within a GString buffer * Refactor cmd_export to build the CSV content in memory using GString, minimizing system calls * Use g_file_set_contents for atomic writing
This commit is contained in:
@@ -1074,7 +1074,6 @@ cmd_script(ProfWin* window, const char* const command, gchar** args)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* escape a string into csv and write it to the file descriptor */
|
||||
static void
|
||||
_append_csv_escaped(GString* buffer, const char* const str)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user