OSC/osc-ood-config

Change favorites to follow convention of adding shortcuts at launch time

Opened this issue · 1 comments

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.

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.