Skip to content

Commit

Permalink
lib-fs: Fix fs_wrapper_write_stream_finish() to work with async paren…
Browse files Browse the repository at this point in the history
…t fs

This only became a problem with the previous fs-compress change.
  • Loading branch information
sirainen committed Oct 16, 2017
1 parent b6fbc23 commit 0cf4f39
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib-fs/fs-wrapper.c
Expand Up @@ -78,14 +78,14 @@ void fs_wrapper_write_stream(struct fs_file *file)

int fs_wrapper_write_stream_finish(struct fs_file *file, bool success)
{
if (file->output == NULL)
return fs_write_stream_finish_async(file->parent);

if (!success) {
fs_write_stream_abort_parent(file, &file->output);
return -1;
}

if (fs_write_stream_finish(file->parent, &file->output) < 0)
return -1;
return 1;
return fs_write_stream_finish(file->parent, &file->output);
}

int fs_wrapper_lock(struct fs_file *file, unsigned int secs,
Expand Down

0 comments on commit 0cf4f39

Please sign in to comment.