When folder is hidden <pick> doesn't work correctly

Things you’d like to miss in the future...
Post Reply
jupe
Posts: 2805
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

When folder is hidden <pick> doesn't work correctly

Post by jupe »

I have noticed that <pick> doesn't work correctly if the current pane is listing a folder which is hidden (from view/tree listing), repro for fresh:

settingp "ShowHiddenItems", 0; goto "%APPDATA%"; text <pick>;

It instead seems to return the contents of other folders, such as the first folder in the hierarchy which isn't hidden, or after a tab switch, the previous tabs location under other circumstances. If you supply the folder param explicitly, it works correctly though.

admin
Site Admin
Posts: 60622
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: When folder is hidden <pick> doesn't work correctly

Post by admin »

Sure? It works fine here. Note that <pick> only returns files. Use <pickall> to return also folders.

jupe
Posts: 2805
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: When folder is hidden <pick> doesn't work correctly

Post by jupe »

Yes I am absolutely certain that in fresh (and my normal and testing config) that repro shows the issue as I intended, I originally spent a while narrowing down why I was getting bogus returns before reporting, what I am uncertain of though is if the appdata folder is in a hidden hierarchy on Win8, so instead try this (in fresh):

Code: Select all

  $fol = "C:\hidden_fol_<date yyyymmdd>";
  new("$fol\filename.txt", "file");
  attrstamp("h", , $fol);
  settingp "ShowHiddenItems", 0;
  goto $fol;
  text <pick>;
I can't think of anything else that would be unique to my system, and multiple XY configs that I have tested in that would affect this.

highend
Posts: 13333
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: When folder is hidden <pick> doesn't work correctly

Post by highend »

Works (it shows a totally unrelated file :biggrin: )

=> D:\Users\Highend\Downloads\desktop.ini
One of my scripts helped you out? Please donate via Paypal

admin
Site Admin
Posts: 60622
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: When folder is hidden <pick> doesn't work correctly

Post by admin »

I could now reproduce it with Maxi Tree enabled. Then the goto command in goto $fol; would simply not go to that folder because it does not exist in the tree. Instead, <pick> would pick stuff from wherever you are now.

How to fix it? Probably SC goto should ignore the Show Hidden setting and just go. I just have to see how big a can of worms this opens up.

... UPDATE: It's okay. Should be fixed in next beta.

jupe
Posts: 2805
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: When folder is hidden <pick> doesn't work correctly

Post by jupe »

Ah, you had MiniTree enabled, I didn't anticipate that, and I didn't sense the issue as being with goto because the pane seemed to have navigated to the folder ok, also I'd mentioned ages ago about hidden folders and goto and that had subsequently been working. Anyway with limited testing so far, all seems resolved in .0001, thanks.

Post Reply