From 1f0610ef8259aa11df8d25e48c06d19d715bff23 Mon Sep 17 00:00:00 2001 From: David Dykstra Date: Mon, 11 Jan 1999 17:07:27 +0000 Subject: [PATCH] Fix segmentation fault when using -vvv. Suggested by assar@sics.se. --- main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.c b/main.c index 737a78af..900cd64e 100644 --- a/main.c +++ b/main.c @@ -171,7 +171,10 @@ static char *get_local_name(struct file_list *flist,char *name) if (verbose > 2) rprintf(FINFO,"get_local_name count=%d %s\n", - flist->count, name); + flist->count, NS(name)); + + if (!name) + return NULL; if (do_stat(name,&st) == 0) { if (S_ISDIR(st.st_mode)) { @@ -192,9 +195,6 @@ static char *get_local_name(struct file_list *flist,char *name) if (flist->count == 1) return name; - if (!name) - return NULL; - if (do_mkdir(name,0777 & ~orig_umask) != 0) { rprintf(FERROR,"mkdir %s : %s (1)\n",name,strerror(errno)); exit_cleanup(RERR_FILEIO); -- 2.34.1