forked from cory/tildefriends
Export app json files indented with tabs.
This commit is contained in:
parent
dbf5c7b832
commit
8cf2837725
@ -171,7 +171,9 @@ void tf_ssb_export(tf_ssb_t* ssb, const char* key)
|
||||
JS_DeleteProperty(context, app, files_atom, 0);
|
||||
JS_FreeAtom(context, files_atom);
|
||||
|
||||
JSValue json = JS_JSONStringify(context, app, JS_NULL, JS_NewInt32(context, 2));
|
||||
JSValue tab = JS_NewString(context, "\t");
|
||||
JSValue json = JS_JSONStringify(context, app, JS_NULL, tab);
|
||||
JS_FreeValue(context, tab);
|
||||
size_t length = 0;
|
||||
const char* string = JS_ToCStringLen(context, &length, json);
|
||||
snprintf(file_path, sizeof(file_path), "apps/%s.json", path);
|
||||
|
Loading…
Reference in New Issue
Block a user