summaryrefslogtreecommitdiffstats
path: root/libftp/ftplib.c
diff options
context:
space:
mode:
authorJudd Vinet <judd@archlinux.org>2003-03-17 20:36:48 +0100
committerJudd Vinet <judd@archlinux.org>2003-03-17 20:36:48 +0100
commit185ce5454e4afd11b1f90d7fe487b0ec3cb840c7 (patch)
treea4ef279317d6fce3e5c4fd00ede528ea62e1c7ed /libftp/ftplib.c
parent0207fad046f76fc37c0fc7c8b6a157225024a3ed (diff)
downloadpacman-185ce5454e4afd11b1f90d7fe487b0ec3cb840c7.tar.gz
pacman-185ce5454e4afd11b1f90d7fe487b0ec3cb840c7.tar.xz
Imported from pacman-2.3.2.tar.gz
Diffstat (limited to 'libftp/ftplib.c')
-rw-r--r--libftp/ftplib.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/libftp/ftplib.c b/libftp/ftplib.c
index 9089a5b3..d8c25f58 100644
--- a/libftp/ftplib.c
+++ b/libftp/ftplib.c
@@ -1104,7 +1104,7 @@ static int FtpXfer(const char *localfile, const char *path,
if (localfile != NULL)
{
- char ac[4] = "w";
+ char ac[4] = "a";
if (typ == FTPLIB_FILE_WRITE)
ac[0] = 'r';
if (mode == FTPLIB_IMAGE)
@@ -1200,6 +1200,22 @@ GLOBALDEF int FtpSize(const char *path, int *size, char mode, netbuf *nControl)
}
/*
+ * FtpRestart - issue a REST command
+ *
+ * return 1 if successful, 0 otherwise
+ */
+GLOBALDEF int FtpRestart(int offset, netbuf *nControl)
+{
+ char cmd[256];
+ int rv=1;
+
+ sprintf(cmd,"REST %d",offset);
+ if (!FtpSendCmd(cmd,'3',nControl))
+ rv = 0;
+ return rv;
+}
+
+/*
* FtpModDate - determine the modification date of a remote file
*
* return 1 if successful, 0 otherwise