Skip to content

Commit

Permalink
conf: Change default cache directory on Windows. (#5537)
Browse files Browse the repository at this point in the history
The default cache directory should not be in the Roaming profile
(%APPDATA%) but much rather in the Local profile (%LOCALAPPDATA%)
since there is no need to synchronize it between computers.
  • Loading branch information
mmaeusezahl committed Feb 10, 2021
1 parent 4c07803 commit c117eba
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion PyInstaller/configure.py
Expand Up @@ -65,7 +65,7 @@ def _get_pyinst_cache_dir():
if compat.getenv('PYINSTALLER_CONFIG_DIR'):
cache_dir = compat.getenv('PYINSTALLER_CONFIG_DIR')
elif is_win:
cache_dir = compat.getenv('APPDATA')
cache_dir = compat.getenv('LOCALAPPDATA')
if not cache_dir:
cache_dir = os.path.expanduser('~\\Application Data')
elif is_darwin:
Expand Down
6 changes: 6 additions & 0 deletions news/5537.bugfix.rst
@@ -0,0 +1,6 @@
(Windows) Change default cache directory to ``LOCALAPPDATA``
(from the original ``APPDATA``).
This is to make sure that cached data
doesn't get synced with the roaming profile.
For this and future versions ``AppData\Roaming\pyinstaller``
might be safely deleted.

0 comments on commit c117eba

Please sign in to comment.