bluesky_cloudlog_sync(commit);
g_mutex_lock(commit->lock);
- while ((commit->pending_write & CLOUDLOG_JOURNAL))
+ while ((commit->location_flags & CLOUDLOG_UNCOMMITTED))
g_cond_wait(commit->cond, commit->lock);
g_mutex_unlock(commit->lock);
char *pathname = g_strdup_printf("%s/%s",
cachefile->log->log_directory,
cachefile->filename);
+ async->data = bluesky_string_dup(async->data);
+ bluesky_cloudlog_decrypt(async->data->data, async->data->len,
+ cachefile->fs->keys);
if (!g_file_set_contents(pathname, async->data->data, async->data->len,
NULL))
g_print("Error writing out fetched file to cache!\n");