diff options
Diffstat (limited to 'source4/client')
-rw-r--r-- | source4/client/client.c | 19 | ||||
-rw-r--r-- | source4/client/smbmount.c | 2 |
2 files changed, 8 insertions, 13 deletions
diff --git a/source4/client/client.c b/source4/client/client.c index 5413beb3ba..986f35b971 100644 --- a/source4/client/client.c +++ b/source4/client/client.c @@ -929,7 +929,7 @@ static void do_mget(struct clilist_file_info *finfo) strlower(discard_const_p(char, finfo->name)); } - if (!directory_exist(finfo->name,NULL) && + if (!directory_exist(finfo->name) && mkdir(finfo->name,0777) != 0) { d_printf("failed to create directory %s\n",finfo->name); pstrcpy(cur_dir,saved_curdir); @@ -1301,15 +1301,11 @@ static int cmd_put(const char **cmd_ptr) dos_clean_name(rname); - { - struct stat st; - /* allow '-' to represent stdin - jdblair, 24.jun.98 */ - if (!file_exist(lname,&st) && - (strcmp(lname,"-"))) { - d_printf("%s does not exist\n",lname); - return 1; - } + /* allow '-' to represent stdin + jdblair, 24.jun.98 */ + if (!file_exist(lname) && (strcmp(lname,"-"))) { + d_printf("%s does not exist\n",lname); + return 1; } return do_put(rname, lname, False); @@ -2479,7 +2475,6 @@ static int cmd_reput(const char **cmd_ptr) pstring remote_name; fstring buf; char *p = buf; - struct stat st; pstrcpy(remote_name, cur_dir); pstrcat(remote_name, "\\"); @@ -2490,7 +2485,7 @@ static int cmd_reput(const char **cmd_ptr) } pstrcpy(local_name, p); - if (!file_exist(local_name, &st)) { + if (!file_exist(local_name)) { d_printf("%s does not exist\n", local_name); return 1; } diff --git a/source4/client/smbmount.c b/source4/client/smbmount.c index e18fb311aa..7f73807ec6 100644 --- a/source4/client/smbmount.c +++ b/source4/client/smbmount.c @@ -496,7 +496,7 @@ static void init_mount(void) asprintf(&smbmnt_path, "%s/smbmnt", dyn_BINDIR); - if (file_exist(smbmnt_path, NULL)) { + if (file_exist(smbmnt_path)) { execv(smbmnt_path, args); fprintf(stderr, "smbfs/init_mount: execv of %s failed. Error was %s.", |