mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 15:48:49 -05:00
Needs 'struct_stat'. Increased verbosity.
This commit is contained in:
parent
726b9e2240
commit
34a827bbfe
@ -8,6 +8,7 @@
|
|||||||
* $Id$
|
* $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "setup.h" /* struct_stat etc. */
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
|
|
||||||
#ifdef HAVE_SYS_SOCKET_H
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
@ -46,10 +47,16 @@ int test(char *URL)
|
|||||||
const char *buf_1 = "RNFR 505";
|
const char *buf_1 = "RNFR 505";
|
||||||
const char *buf_2 = "RNTO 505-forreal";
|
const char *buf_2 = "RNTO 505-forreal";
|
||||||
|
|
||||||
|
if (!arg2) {
|
||||||
|
fprintf(stderr, "Usage: <url> <file-to-upload>\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
/* get the file size of the local file */
|
/* get the file size of the local file */
|
||||||
hd = stat(arg2, &file_info);
|
hd = stat(arg2, &file_info);
|
||||||
if(hd == -1) {
|
if(hd == -1) {
|
||||||
/* can't open file, bail out */
|
/* can't open file, bail out */
|
||||||
|
fprintf(stderr, "WARNING: cannot open file %s\n", arg2);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user