Skip to content

Commit

Permalink
lib-fs: Fixed fs-sis to work again
Browse files Browse the repository at this point in the history
  • Loading branch information
sirainen committed Mar 10, 2016
1 parent 2839c7c commit 3b39022
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib-fs/fs-posix.c
Expand Up @@ -648,7 +648,10 @@ static int fs_posix_stat(struct fs_file *_file, struct stat *st_r)
{
struct posix_fs_file *file = (struct posix_fs_file *)_file;

if (file->fd != -1) {
/* in case output != NULL it means that we're still writing to the file
and fs_stat() shouldn't stat the unfinished file. this is done by
fs-sis after fs_copy(). */
if (file->fd != -1 && _file->output == NULL) {
if (fstat(file->fd, st_r) < 0) {
fs_set_error(_file->fs, "fstat(%s) failed: %m", file->full_path);
return -1;
Expand Down

0 comments on commit 3b39022

Please sign in to comment.