Skip to content

Commit

Permalink
Fixed a crash bug in get_local_name() when the file list is empty.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wayne Davison committed Sep 23, 2007
1 parent e0cfd15 commit 7341ee2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,8 @@ static char *get_local_name(struct file_list *flist, char *dest_path)
exit_cleanup(RERR_FILEIO);
}

if (strcmp(flist->files[0]->basename, ".") == 0)
if (flist->high >= flist->low
&& strcmp(flist->files[flist->low]->basename, ".") == 0)
flist->files[0]->flags |= FLAG_DIR_CREATED;

if (verbose)
Expand Down

0 comments on commit 7341ee2

Please sign in to comment.