kore

Kore is a web application platform for writing scalable, concurrent web based processes in C or Python.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit a95862783732513173fdf78b64a177422220b426
parent d67b5aaa047c984461cd736e9140c7154b819b99
Author: Joris Vink <joris@coders.se>
Date:   Wed, 20 Jan 2016 10:33:32 +0100

Unlink correct file in upload example.

Diffstat:
examples/upload/src/upload.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/examples/upload/src/upload.c b/examples/upload/src/upload.c @@ -68,6 +68,7 @@ page(struct http_request *req) } /* While we have data from http_file_read(), write it. */ + /* Alternatively you could look at file->offset and file->length. */ ret = KORE_RESULT_ERROR; for (;;) { ret = http_file_read(file, buf, sizeof(buf)); @@ -106,7 +107,7 @@ cleanup: kore_log(LOG_WARNING, "close(%s): %s", file->filename, errno_s); if (ret == KORE_RESULT_ERROR) { - if (unlink("dump") == -1) { + if (unlink(file->filename) == -1) { kore_log(LOG_WARNING, "unlink(%s): %s", file->filename, errno_s); }