getEntries() throws an error if the folder contains hidden items on Mac

I’ve noticed that folder.getEntries() throws an error if the folder contains invisible OSX items, as when folders have custom icons assigned.

this folder has a custom icon (cmd + shift + . to show/hide hidden items):

The error is:
Error: no such file or directory] code: -2

This folder has the default icon:
Screenshot 2019-12-12 at 11.55.54
In this case, folder.getEntries() is executed correctly.

OSX version: Catalina 10.15.1

Hmm. I’m wondering if this is an expected behavior. I will reach out to XD engineering (@schenglooi) to get an answer for you.

Thanks a lot @stevekwak!

I’ve notified @kerrishotts instead since this is a UXP bug. She did confirm that it’s a bug and she will create a ticket for this.

2 Likes