summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/libsmbclient.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/libsmb/libsmbclient.c b/source3/libsmb/libsmbclient.c
index fcc7c65a3a..dd3cbfc621 100644
--- a/source3/libsmb/libsmbclient.c
+++ b/source3/libsmb/libsmbclient.c
@@ -3536,6 +3536,11 @@ smbc_lseekdir_ctx(SMBCCTX *context,
}
+ if (offset == -1) { /* Seek to the end of the list */
+ dir->dir_next = NULL;
+ return 0;
+ }
+
/* Now, run down the list and make sure that the entry is OK */
/* This may need to be changed if we change the format of the list */