getEntries() throws an error if the folder has user-assigned custom icon 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:


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

Any news regarding the above issue?
XD 27 keeps throwing that error.

Is there any chance that this will be solved in the next release?

We’re working on optimizations and a refactor in this area, so I’m hopeful this will be addressed. It won’t make it for XD 28, though. (TBD on when.)

1 Like

For what it’s worth: the only case we’re aware of where this is a problem is when the folder has a user-assigned custom icon. Other types of “hidden files” don’t cause problems as far as I know.

Confirmed, getEntries() throws the error with custom icons only. Hope it will solved soon, Mac users do love use custom icons.