* slash.
*/
lastpart[-1] = '\0';
+ } else if (!*dupsource) {
+ /*
+ * The remains of dupsource are _empty_ - the whole
+ * pathname was a wildcard. Hence we need to
+ * replace it with ".".
+ */
+ sfree(dupsource);
+ dupsource = dupstr(".");
}
/*
* Simple case: we are only dealing with one file.
*/
fname = scp_sftp_remotepath;
+printf("oi :%s:\n", fname);
must_free_fname = 0;
scp_sftp_donethistarget = 1;
} else {
!wc_match(head->wildcard,
head->names[head->namepos].filename))))
head->namepos++; /* skip . and .. */
+printf("ooh\n");
if (head->namepos < head->namelen) {
fname = dupcat(head->dirpath, "/",
head->names[head->namepos++].filename,
NULL);
+printf("got :%s:\n", fname);
must_free_fname = 1;
} else {
/*
return 0;
}
}
-
+printf("filename :%s:\n", fname);
/*
* Now we have a filename. Stat it, and see if it's a file
* or a directory.