Commit 1f0610ef authored by David Dykstra's avatar David Dykstra

Fix segmentation fault when using -vvv. Suggested by assar@sics.se.

parent 379e689d
...@@ -171,7 +171,10 @@ static char *get_local_name(struct file_list *flist,char *name) ...@@ -171,7 +171,10 @@ static char *get_local_name(struct file_list *flist,char *name)
if (verbose > 2) if (verbose > 2)
rprintf(FINFO,"get_local_name count=%d %s\n", 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 (do_stat(name,&st) == 0) {
if (S_ISDIR(st.st_mode)) { if (S_ISDIR(st.st_mode)) {
...@@ -192,9 +195,6 @@ static char *get_local_name(struct file_list *flist,char *name) ...@@ -192,9 +195,6 @@ static char *get_local_name(struct file_list *flist,char *name)
if (flist->count == 1) if (flist->count == 1)
return name; return name;
if (!name)
return NULL;
if (do_mkdir(name,0777 & ~orig_umask) != 0) { if (do_mkdir(name,0777 & ~orig_umask) != 0) {
rprintf(FERROR,"mkdir %s : %s (1)\n",name,strerror(errno)); rprintf(FERROR,"mkdir %s : %s (1)\n",name,strerror(errno));
exit_cleanup(RERR_FILEIO); exit_cleanup(RERR_FILEIO);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment