Change config dir, offer to migrate
Moment has different default directories and is controlled by different environment variables. On first startup, Moment detects Mirage directories and offers to copy them. It doesn't make sense to migrate logins without migrating encryption keys, so this is now included in migration. Themes are migrated as well. Only offer migration is only if both config and data directory are able to be migrated.
This commit is contained in:
@@ -104,7 +104,7 @@ class Backend:
|
||||
media_cache: A matrix media cache for downloaded files.
|
||||
|
||||
presences: A `{user_id: Presence}` dict for storing presence info about
|
||||
matrix users registered on Mirage.
|
||||
matrix users registered on Moment.
|
||||
|
||||
mxc_events: A dict storing media `Event` model items for any account
|
||||
that have the same mxc URI
|
||||
@@ -137,7 +137,7 @@ class Backend:
|
||||
DefaultDict(asyncio.Lock) # {room_id: lock}
|
||||
|
||||
cache_dir = Path(
|
||||
os.environ.get("MIRAGE_CACHE_DIR") or self.appdirs.user_cache_dir,
|
||||
os.environ.get("MOMENT_CACHE_DIR") or self.appdirs.user_cache_dir,
|
||||
)
|
||||
|
||||
self.media_cache: MediaCache = MediaCache(self, cache_dir)
|
||||
|
Reference in New Issue
Block a user