Application cwd in SNAP_APP_PATH vs SNAP_APP_DATA_PATH
Didier Roche
didrocks at ubuntu.com
Fri Mar 4 16:01:58 UTC 2016
Le 04/03/2016 16:53, Gustavo Niemeyer a écrit :
> Well, one can "work" anywhere really. The analogy with $HOME is
> interesting, for example, because one doesn't usually write in $HOME
> itself, but rather creates a per-application directory and writes into
> that instead. So very similar.
>
> That said, countering my own point there's the argument that there's
> nothing useful one can do with CWD being $SNAP, I think?
Indeed, I think that most of developers, when dealing with assets,
wanting to execute some helpers or open some files part of their snap,
are more relying on an absolute/well-known-starting point path instead
of hoping that CWD is the root of their snap.
So, they will probably either use:
$SNAP/<path_to_asset_or_helper>
or:
dirname(my_current_exec)/../<rel_path_to_asset_or_helper>
>
> So it'd probably be fine with changing it to $SNAP_DATA too, as a
> default. People will find out about $SNAP_USER_DATA when they need to.
Agreed!
Didier
More information about the snappy-devel
mailing list