- don't show "created directory" message unless verbose is selected
authorAndrew Tridgell <tridge@samba.org>
Thu, 2 Jul 1998 02:08:55 +0000 (02:08 +0000)
committerAndrew Tridgell <tridge@samba.org>
Thu, 2 Jul 1998 02:08:55 +0000 (02:08 +0000)
- check for null buf in show_progress

main.c
match.c

diff --git a/main.c b/main.c
index dc2aac4..3e39a85 100644 (file)
--- a/main.c
+++ b/main.c
@@ -202,7 +202,8 @@ static char *get_local_name(struct file_list *flist,char *name)
                rprintf(FERROR,"mkdir %s : %s (1)\n",name,strerror(errno));
                exit_cleanup(1);
        } else {
-               rprintf(FINFO,"created directory %s\n",name);
+               if (verbose > 0)
+                       rprintf(FINFO,"created directory %s\n",name);
        }
 
        if (!push_dir(name, 0)) {
diff --git a/match.c b/match.c
index f54c229..845bd35 100644 (file)
--- a/match.c
+++ b/match.c
@@ -119,7 +119,8 @@ static void matched(int f,struct sum_struct *s,struct map_struct *buf,
        else
                last_match = offset;
 
-       show_progress(last_match, buf->size);
+       if (buf)
+               show_progress(last_match, buf->size);
 
        if (i == -1) end_progress();
 }