Application cwd in SNAP_APP_PATH vs SNAP_APP_DATA_PATH
Gustavo Niemeyer
gustavo.niemeyer at canonical.com
Fri Mar 4 14:56:46 UTC 2016
The snap should make a conscious choice between $SNAP_DATA and
$SNAP_USER_DATA, so the fact the snap cannot just assume the current
directory is the place to put data is actually a good thing.
Please note these recent variable changes:
$SNAP_APP_PATH => $SNAP
$SNAP_APP_DATA_PATH => $SNAP_DATA
$SNAP_APP_USER_DATA_PATH (!) => $SNAP_USER_DATA
On Fri, Mar 4, 2016 at 2:59 AM, Didier Roche <didrocks at ubuntu.com> wrote:
> Hey,
>
> Discussing with Michael yesterday, it seems that this wasn't really
> discussed in the past and may be a good change for 16.04 for the big
> cleanup time :)
> I was first surprised to see that when starting an application, the
> current directory was SNAP_APP_PATH.
>
> In traditional systems, the current directory is generally a path where
> the app have write access to (like $HOME or the one your are in for CLI).
> I realize that in most of the snappy apps/services I'm writing, I'm
> doing `cd $SNAP_APP_DATA_PATH` as first thing in most of them.
>
> In that case, is there any particular reason to set the current working
> directory to SNAP_APP_PATH instead of SNAP_APP_DATA_PATH or would a
> change to set it to the latter makes sense for 16.04?
>
> Cheers,
> Didier
>
>
> --
> snappy-devel mailing list
> snappy-devel at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/snappy-devel
>
--
gustavo @ http://niemeyer.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snappy-devel/attachments/20160304/0eb2d7d4/attachment.html>
More information about the snappy-devel
mailing list