Page 1 of 1

Error 91 on paperfolder after execution of a script

Posted: 06 Oct 2021 16:43
by zakhar
Hello, dear XYplorer Community!

I seem to find a bug. Steps to reproduce:

1. load a paperfolder with some folders in it,
2. execute the script - the aim of the script is to open the found 1st level subfolders.
(Running this script after a paperfolder was loaded was a random event.)

Code: Select all

 $firstFolder = "<curpath>";
 $qs1 = quicksearch(" /dn","<curpath>");
 $qs1count = gettoken($qs1,"count",<crlf>);
 $i1 = 1;
 while($i1 <= $qs1count){
    $folder = gettoken($qs1,$i1,<crlf>);
    goto "$folder";
    $i1++;
 }
 goto "$firstFolder";
 
3. result:
-1. Error 91,
-2. XYplorer will not show anything in it's list - everywhere.
XYplorer must be restarted to terminate this behavior.
Bug-91.jpg

Re: Error 91 on paperfolder after execution of a script

Posted: 06 Oct 2021 16:57
by highend
That might be not handled very gracefully and should be changed but at the same time you are responsible for what the script is doing. So why do you think that a quicksearch in "paper:<name of the paperfolder>" would lead to any usable result?

Re: Error 91 on paperfolder after execution of a script

Posted: 06 Oct 2021 17:14
by zakhar
highend wrote: 06 Oct 2021 16:57 So why do you think that a quicksearch in "paper:<name of the paperfolder>" would lead to any usable result?
Where did you find this in my text, highend?
You seem to have not respect this text line:
zakhar wrote: 06 Oct 2021 16:43 (Running this script after a paperfolder was loaded was a random event.)

Re: Error 91 on paperfolder after execution of a script

Posted: 06 Oct 2021 17:19
by highend
I didn't miss anything here. Just prevent your script doing a search in paperfolder

Re: Error 91 on paperfolder after execution of a script

Posted: 06 Oct 2021 17:37
by admin
SC quicksearch supports Paper Folders, see this example in the Help:
Search paperfolder "echo" non-recursively:
text quicksearch("*.jpg /n", "paper:echo");
However, it stopped working when "Explicit Save Only" was introduced (what a can of worms!). So it's a bug. :bug: Fixed in next beta.

Re: Error 91 on paperfolder after execution of a script

Posted: 06 Oct 2021 17:39
by highend
I didn't imply that as a: Do this forever but as a workaround for the bug^^