Skip to content

Update redbean ProgramDirectory to return a list of previously set directories #1021

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

Merged
merged 1 commit into from
Jan 5, 2024

Conversation

pkulchenko
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@mrdomino mrdomino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you give me a bit of context on why this is desired?

Also, what does ProgramDirectory return if called with other than nil?

@pkulchenko
Copy link
Collaborator Author

@mrdomino, sure. Right now external directories can be added by calling ProgramDirectory, but it's impossible to get a list of currently assigned directories (those that are added with -D or ProgramDirectory), which is useful in getting those directories re-scanned to detect new resources. There have been several requests for this functionality and it's difficult to implement without having the list of directories.
When ProgramDirectory is called to add a new value, nothing is returned, as I wouldn't expect the developer to need a value and didn't want to unnecessarily create and populate a table.

Copy link
Collaborator

@mrdomino mrdomino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jart jart merged commit a334f9c into jart:master Jan 5, 2024
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

Successfully merging this pull request may close these issues.

3 participants