Replace all printfs with tf_printf, which redirects to android logging. Change into the files directory so that sqlite can do its thing. Getting closer.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4203 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
#include "ssb.export.h"
|
||||
|
||||
#include "log.h"
|
||||
#include "mem.h"
|
||||
#include "ssb.db.h"
|
||||
#include "ssb.h"
|
||||
@ -19,7 +20,7 @@ static void _write_file(const char* path, const void* blob, size_t size)
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("Failed to open %s for write: %s.\n", path, strerror(errno));
|
||||
tf_printf("Failed to open %s for write: %s.\n", path, strerror(errno));
|
||||
}
|
||||
}
|
||||
|
||||
@ -31,7 +32,7 @@ static void _make_dir(const char* path)
|
||||
if (mkdir(path, 0755) && errno != EEXIST)
|
||||
#endif
|
||||
{
|
||||
printf("Failed to create directory %s: %s.\n", path, strerror(errno));
|
||||
tf_printf("Failed to create directory %s: %s.\n", path, strerror(errno));
|
||||
}
|
||||
}
|
||||
|
||||
@ -63,7 +64,7 @@ static void _tf_ssb_export_scandir(uv_fs_t* req)
|
||||
int r = uv_fs_unlink(tf_ssb_get_loop(export->ssb), &req, path, NULL);
|
||||
if (r)
|
||||
{
|
||||
printf("Failed to unlink %s: %s.", path, uv_strerror(r));
|
||||
tf_printf("Failed to unlink %s: %s.", path, uv_strerror(r));
|
||||
}
|
||||
uv_fs_req_cleanup(&req);
|
||||
tf_free(path);
|
||||
@ -80,7 +81,7 @@ void tf_ssb_export(tf_ssb_t* ssb, const char* key)
|
||||
char path[256] = { 0 };
|
||||
if (sscanf(key, "/~%255[^/]/%255s", user, path) != 2)
|
||||
{
|
||||
printf("Unable to export %s.\n", key);
|
||||
tf_printf("Unable to export %s.\n", key);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -106,7 +107,7 @@ void tf_ssb_export(tf_ssb_t* ssb, const char* key)
|
||||
|
||||
if (!*app_blob_id)
|
||||
{
|
||||
printf("Did not find app blob ID for %s.\n", key);
|
||||
tf_printf("Did not find app blob ID for %s.\n", key);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -114,7 +115,7 @@ void tf_ssb_export(tf_ssb_t* ssb, const char* key)
|
||||
size_t size = 0;
|
||||
if (!tf_ssb_db_blob_get(ssb, app_blob_id, &blob, &size))
|
||||
{
|
||||
printf("Did not find blob for %s: %s.\n", key, app_blob_id);
|
||||
tf_printf("Did not find blob for %s: %s.\n", key, app_blob_id);
|
||||
return;
|
||||
}
|
||||
char file_path[1024];
|
||||
@ -191,7 +192,7 @@ void tf_ssb_export(tf_ssb_t* ssb, const char* key)
|
||||
int r = uv_fs_scandir(tf_ssb_get_loop(ssb), &export.req, file_path, 0, _tf_ssb_export_scandir);
|
||||
if (r)
|
||||
{
|
||||
printf("Failed to scan directory %s: %s.", file_path, uv_strerror(r));
|
||||
tf_printf("Failed to scan directory %s: %s.", file_path, uv_strerror(r));
|
||||
}
|
||||
while (!export.done)
|
||||
{
|
||||
|
Reference in New Issue
Block a user