diff --git a/README.md b/README.md index 941aecdc..a4bac8f4 100644 --- a/README.md +++ b/README.md @@ -62,35 +62,33 @@ major problems. - `TAGS`: set build tags for tests - `FEATURES`: set feature dir, file or scenario to test +## Folders + +There are now three types of system folders which Bridge recognises: + +| | Windows | Mac | Linux | Linux (XDG) | +|--------|-------------------------------------|----------------------------------------------------|-------------------------------------|---------------------------------------| +| config | %APPDATA%\protonmail\bridge-v3 | ~/Library/Application Support/protonmail/bridge-v3 | ~/.config/protonmail/bridge-v3 | $XDG_CONFIG_HOME/protonmail/bridge-v3 | +| cache | %LOCALAPPDATA%\protonmail\bridge-v3 | ~/Library/Caches/protonmail/bridge-v3 | ~/.cache/protonmail/bridge-v3 | $XDG_CACHE_HOME/protonmail/bridge-v3 | +| data | %LOCALAPPDATA%\protonmail\bridge-v3 | ~/Library/Caches/protonmail/bridge-v3 | ~/.local/share/protonmail/bridge-v3 | $XDG_DATA_HOME/protonmail/bridge-v3 | +| temp | %LOCALAPPDATA%\Temp | /tmp | /tmp | /tmp | + + ## Files -### Database -The database stores metadata necessary for presenting messages and mailboxes to an email client: -- Linux: `~/.cache/protonmail/bridge//mailbox-.db` (unless `XDG_CACHE_HOME` is set, in which case that is used as your `~`) -- macOS: `~/Library/Caches/protonmail/bridge//mailbox-.db` -- Windows: `%LOCALAPPDATA%\protonmail\bridge\\mailbox-.db` -### Preferences -User preferences are stored in json at the following location: -- Linux: `~/.config/protonmail/bridge/prefs.json` -- macOS: `~/Library/ApplicationSupport/protonmail/bridge/prefs.json` -- Windows: `%APPDATA%\protonmail\bridge\prefs.json` +| | Base Dir | Path | +|-----------------------|----------|----------------------------| +| bridge lock file | cache | bridge.lock | +| bridge-gui lock file | cache | bridge-gui.lock | +| gluon messages | cache | gluon/backend/store | +| vault | config | vault.enc | +| gRPC server json | config | grpcServerConfig.json | +| gRPC client json | config | grpcClientConfig_.json | +| Logs | data | logs | +| gluon DB | data | gluon/backend/db | +| Update files | data | updates | +| sentry cache | data | sentry_cache | +| Mac/Linux File Socket | temp | bridge_{RANDOM_UUID}.sock | -### IMAP Cache -The currently subscribed mailboxes are held in a json file: -- Linux: `~/.cache/protonmail/bridge//user_info.json` (unless `XDG_CACHE_HOME` is set, in which case that is used as your `~`) -- macOS: `~/Library/Caches/protonmail/bridge//user_info.json` -- Windows: `%LOCALAPPDATA%\protonmail\bridge\\user_info.json` - -### Lock file -Bridge utilises an on-disk lock to ensure only one instance is run at once. The lock file is here: -- Linux: `~/.cache/protonmail/bridge//bridge.lock` (unless `XDG_CACHE_HOME` is set, in which case that is used as your `~`) -- macOS: `~/Library/Caches/protonmail/bridge//bridge.lock` -- Windows: `%LOCALAPPDATA%\protonmail\bridge\\bridge.lock` - -### TLS Certificate and Key -When bridge first starts, it generates a unique TLS certificate and key file at the following locations: -- Linux: `~/.config/protonmail/bridge/{cert,key}.pem` (unless `XDG_CONFIG_HOME` is set, in which case that is used as your `~/.config`) -- macOS: `~/Library/ApplicationSupport/protonmail/bridge/{cert,key}.pem` -- Windows: `%APPDATA%\protonmail\bridge\{cert,key}.pem`