summaryrefslogtreecommitdiff
path: root/lib/ftplistparser.c
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2018-02-10 15:13:15 +0100
committerDaniel Stenberg <daniel@haxx.se>2018-02-15 09:36:03 +0100
commitb46cfbc068ebe90f18e9777b9e877e4934c1b5e3 (patch)
tree4d88b0f4d9492f51a93251e488400ff7a8abba62 /lib/ftplistparser.c
parent43a50a2580db2bfb28483a96964ae27b584472da (diff)
downloadcurl-b46cfbc068ebe90f18e9777b9e877e4934c1b5e3.tar.gz
TODO fixed: Detect when called from within callbacks
Closes #2302
Diffstat (limited to 'lib/ftplistparser.c')
-rw-r--r--lib/ftplistparser.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/ftplistparser.c b/lib/ftplistparser.c
index 262ac0306..7668ea8c8 100644
--- a/lib/ftplistparser.c
+++ b/lib/ftplistparser.c
@@ -49,6 +49,7 @@
#include "ftplistparser.h"
#include "curl_fnmatch.h"
#include "curl_memory.h"
+#include "multiif.h"
/* The last #include file should be: */
#include "memdebug.h"
@@ -294,6 +295,7 @@ static CURLcode ftp_pl_insert_finfo(struct connectdata *conn,
compare = Curl_fnmatch;
/* filter pattern-corresponding filenames */
+ Curl_set_in_callback(conn->data, true);
if(compare(conn->data->set.fnmatch_data, wc->pattern,
finfo->filename) == 0) {
/* discard symlink which is containing multiple " -> " */
@@ -305,6 +307,7 @@ static CURLcode ftp_pl_insert_finfo(struct connectdata *conn,
else {
add = FALSE;
}
+ Curl_set_in_callback(conn->data, false);
if(add) {
Curl_llist_insert_next(llist, llist->tail, finfo, &infop->list);