From bf4e66d1a22aad9af5e0fa2e43af54aa13f745cc Mon Sep 17 00:00:00 2001 From: neil Date: Sat, 29 Mar 2014 20:30:16 +0000 Subject: [PATCH] Check that initial lock is a directory. git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@48889 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- test/scantest.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/scantest.c b/test/scantest.c index d26ec38784..5aa0d7a8f9 100644 --- a/test/scantest.c +++ b/test/scantest.c @@ -1,3 +1,8 @@ +/* + Copyright © 1995-2014, The AROS Development Team. All rights reserved. + $Id$ +*/ + #include #include #include @@ -15,7 +20,10 @@ void ReadAll(BPTR lock) int count = 1; success = Examine(lock, FIB); - success = ExNext(lock,FIB); + if (FIB->fib_DirEntryType < 0) + success = FALSE; + if (success) + success = ExNext(lock, FIB); while (success) { printf("%s",FIB->fib_FileName); -- 2.11.4.GIT