Page MenuHome

macOS: add tilde based path expander
ClosedPublic

Authored by Ankit Meel (ankitm) on Nov 13 2021, 12:54 PM.

Details

Summary

Will replace HOME env variable usage for user
directories.


Caught my attention in D12802#344219

Diff Detail

Repository
rB Blender

Event Timeline

Ankit Meel (ankitm) requested review of this revision.Nov 13 2021, 12:54 PM
Ankit Meel (ankitm) created this revision.
Brecht Van Lommel (brecht) requested changes to this revision.Nov 26 2021, 2:47 PM

We should not commit an incomplete implementation like this.

It's also not clear to me that GHOST_kUserSpecialDirLibrary is a good abstraction for GHOST, since that concept does not exist for other platforms. I would think more specific ones like GHOST_kUserSpecialDirFonts would be better.

This revision now requires changes to proceed.Nov 26 2021, 2:47 PM
Ankit Meel (ankitm) retitled this revision from Ghost/ macOS: add user library and home folder queries. to macOS: add tilde based path expander.
Ankit Meel (ankitm) edited the summary of this revision. (Show Details)

Discard ghost: implementing GHOST_kUserSpecialDirHome or GHOST_kUserSpecialDirFonts for windows creates dependence on blenlib AFAIK. So used storage_apple.mm since expanding ~/ can count as a directory operation.

I thought about adding BLI_mac_user_home_dir to storage_apple.mm but then there'd be two functions (that and BKE_appdir_folder_home) doing the same thing.

This revision is now accepted and ready to land.Dec 9 2021, 9:02 PM
This revision was automatically updated to reflect the committed changes.