From ed68e57f647ab305644e26d6f0d4a23647e4066b Mon Sep 17 00:00:00 2001 From: Jacob Barthelmeh Date: Mon, 6 Aug 2018 15:53:12 -0600 Subject: [PATCH] account for emptying directory stack --- src/wolfscp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wolfscp.c b/src/wolfscp.c index 2fba1958..93b10863 100644 --- a/src/wolfscp.c +++ b/src/wolfscp.c @@ -1087,6 +1087,9 @@ static int ParseBasePathHelper(WOLFSSH* ssh, int cmdSz) } else { ret = ScpPopDir(&ctx, ssh->ctx->heap); + if (ret == WS_SCP_DIR_STACK_EMPTY_E) { + ret = WS_SUCCESS; /* is ok to empty the directory stack here */ + } } /* default case of directory */