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

Change favorites to follow convention of adding shortcuts at launch time #32

Open
ericfranz opened this issue May 7, 2019 · 1 comment

Comments

@ericfranz
Copy link
Contributor

This would be slightly more performant, since on each request we wouldn't be checking for the existence of a bunch of directories that do not exist. So we would replace:

projects = User.new.groups.map(&:name).grep(/^P./)
paths.concat projects.map { |p| Pathname.new("/fs/project/#{p}") }
# add scratch space directories
paths << Pathname.new("/fs/scratch/#{User.new.name}")
paths.concat projects.map { |p| Pathname.new("/fs/scratch/#{p}") }

with something closer to the solution in https://discourse.osc.edu/t/other-directories-in-files-explorer-app/335

Though the files shortcuts to newly created project or scratch directories would not appear in the menu until the dashboard was restarted.

@ericfranz
Copy link
Contributor Author

Essentially, we use glob so that we only add to the candidate paths directories we already have verified to exist, instead of all the possible directories.

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

1 participant