Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/pycookiecheat/chrome.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,18 +121,18 @@ def get_macos_config(browser: BrowserType) -> dict:
".get_macos_config"
)
raise ValueError(errmsg) from e
cookie_file = "~" / app_support / cookies_suffix
cookie_file = Path.home() / app_support / cookies_suffix

# Cookie location and keyring username in MacOS depends on whether the
# application was installed from the App Store or direct download. To find
# out, we simply assume it's direct download and fall back to App Store if
# it's not there. Currently this distinction is only known for Slack, so
# that is the only case handled here.
isAppStore = False
if browser is BrowserType.SLACK and not cookie_file.expanduser().exists():
if browser is BrowserType.SLACK and not cookie_file.exists():
isAppStore = True
cookie_file = (
"~/Library/Containers/com.tinyspeck.slackmacgap/Data"
Path.home() / "Library/Containers/com.tinyspeck.slackmacgap/Data"
/ app_support / cookies_suffix
)

Expand Down