Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileSystem listDirectories has unexpected entries #273

Open
Deijin27 opened this issue Jul 12, 2024 · 2 comments
Open

FileSystem listDirectories has unexpected entries #273

Deijin27 opened this issue Jul 12, 2024 · 2 comments

Comments

@Deijin27
Copy link

When you run FileSystem.listDirectories there is two extra entries in the list "." and ".."
This seems to be inherent to the win32 FindNextFile function called by tinydir.

It caught me out because I was writing a function to recursively get files from a directory, and I was getting an infinite loop so the dome window never showed but dome was still running.

I'm thinking these should probably be filtered out and not included in the result of FileSystem.listDirectories. What do you think?

@avivbeeri
Copy link
Collaborator

avivbeeri commented Jul 12, 2024 via email

@Deijin27
Copy link
Author

Just tested on linux and the dots are there too.

The function for this in wren_cli does not have dots. Neither do any apis in other programming languages I know of. I can't think of a situation where you wouldn't need to filter them out to get what you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants