Skip to content

Commit

Permalink
lib: Fixed file_copy() after recent changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
sirainen committed May 31, 2016
1 parent 567ace1 commit 0f56c2a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/file-copy.c
Expand Up @@ -18,7 +18,7 @@ static int file_copy_to_tmp(const char *srcpath, const char *tmppath,
struct stat st;
mode_t old_umask;
int fd_in, fd_out;
off_t ret;
int ret = -1;

if (try_hardlink) {
/* see if hardlinking works */
Expand Down Expand Up @@ -72,6 +72,7 @@ static int file_copy_to_tmp(const char *srcpath, const char *tmppath,

switch (o_stream_send_istream(output, input)) {
case OSTREAM_SEND_ISTREAM_RESULT_FINISHED:
ret = 0;
break;
case OSTREAM_SEND_ISTREAM_RESULT_WAIT_INPUT:
case OSTREAM_SEND_ISTREAM_RESULT_WAIT_OUTPUT:
Expand Down

0 comments on commit 0f56c2a

Please sign in to comment.