Page 1 of 1

Listing files for current path ?

Posted: 22 Sep 2018 00:17
by CookieMonster
Why doesn't the seventh line print the list of files for the current path ?

Code: Select all

if($deepsrch==1){
     foreach($nn,$askusr){
     $fList = gettoken($mvfld,1,"|",t,1);
     quicksearch($fList,$nn,<crlf>,n);
     text getpathcomponent($nn,"parent",1,1);
     if($askusr==<curpath>){
     text listfolder(<curpath>,"*.jpg",1,"|");
    }
     }
    }

Re: Listing files for current path ?

Posted: 22 Sep 2018 00:27
by highend
Probably because

Code: Select all

if($askusr==<curpath>){
isn't true?

What is the reason to use quicksearch() if you don't assign what it returns to a variable?

Re: Listing files for current path ?

Posted: 22 Sep 2018 00:41
by CookieMonster
It's always going to be true, it's simple a check.

Re: Listing files for current path ?

Posted: 22 Sep 2018 00:49
by highend
So,

Code: Select all

text getpathcomponent($nn,"parent",1,1);
is executed but

Code: Select all

text listfolder(<curpath>,"*.jpg",1,"|");
isn't?

And (if that's the case) you tell us that the if check is always true...

Check that logic... Twice!

It's a string comparison, if only a single character is different (e.g. lower- vs uppercase) the check fails...