Disable auto-refresh OR hotswaping config folders

Hi,

I’ve got an issue with Brave browser. When it is running while an update is made, the config folder remains attached to the previous build. So for example :

  • When I start brave, the current folder is ‘160’ (in /home/user/snap/brave)
  • While running, there is an auto-update, and the new current folder is now ‘161’
  • When I make a new password, or bookmarks, etc… It is saved in the old ‘160’ folder
  • So when I eventually restart brave, all data generated since the auto-update are ‘lost’ because it wasn’t saved in the new current folder.

So my first guess to avoid that issue was to disable the auto-update and make them manually when brave is not running. But it appears that it may not be possible. Can I disable auto-updates for this specific app ?

If not I would like to know how is it possible to do a kind of ‘hotswaping’ of folders, meaning that when an update is made while brave is running, that the data is saved in the latest config folder, not the one used when brave started. Is it possible ?

If you have an other approach to that issue I’ll consider it also.

Thanks by advance

Please file a bug for brave. As described in https://snapcraft.io/docs/data-locations snaps have SNAP_USER_COMMON which is a fixed path for all revisions of the app and is’a fixed path at $HOME/snap/<name>/common. The brave snap should be using this instead of $SNAP_USER_DATA.

I believe you need the feature described in this thread. TL;DR: it will prevent updates from happening for a specific app whenever it is running.

It is supposed to leave experimental stage soon, as seen in last comment. Been using for a while, works really well.

Thanks for your responses.

I’ll try your solution @ivo.cavalcante while brave change the folder accordingly to @mborzecki

If the issue persist I’ll let you know

+++