Page MenuHome

File Browser/ macOS: Don't show .app as directory
ClosedPublic

Authored by Ankit Meel (ankitm) on Oct 9 2020, 11:36 AM.

Details

Summary

While there are other bundles which show up as directories,
.app are the most common ones.

This change shows .app files like non-compatible files.

Diff Detail

Repository
rB Blender

Event Timeline

Ankit Meel (ankitm) requested review of this revision.Oct 9 2020, 11:36 AM
Ankit Meel (ankitm) created this revision.
  • Use full_path, not target.

Feels weird to have entries reported as directories but being actually files… I guess Mac ways remain obscure to me. Wouldn't mind some quick approval from the Platform: macOS team, but otherwise patch LGTM.

Which problem does this solve? Was there some user confusion around this?

As far as Blender is concerned, treating the .app like a folder seems like the more useful behavior since there may be e.g. text or image files inside that you can open.

Ankit Meel (ankitm) added a comment.EditedOct 9 2020, 3:44 PM

@dan grauer (kromar) had pointed this out in chat.
I was split while making this change.
Pros:

  • Don't accidentally save something inside apps, or edit them unintentionally. Except Blender, no app encourages editing app bundles.
  • Declutter the UI when browsing say ~/Applications (where I keep some apps and several scripts/github repos)
  • Match Finder's behaviour for showing them as files. (Though Finder also has a "show package content" to jump into the app).

Cons:

  • Blender has scripts inside the app.
  • Feels like we're limiting a non-zero number of users.

Alternative solution:
Show apps (as directories) only when filter checkbox is turned off. When filtering, normal directories, blend files, images etc show up. When not filtering, everything including apps (as dirs) show up.

This will also prevent unexpected directories/files from being displayed when using "Recursions" display option.

Well, the current icon (folder) is certainly completely wrong.

I think that we can leave the possibility of navigation inside the .app by manually entering a path into the File Path.
For rare cases, if necessary. In all other cases, it should be treated as a file.

Ok, in practice it's probably fine to not display it as a folder ever in Blender. Editing files in a code-signed .app bundle will invalidate it anyway, and needing to read files from there is rare.

This revision is now accepted and ready to land.Oct 12 2020, 2:35 PM