##// END OF EJS Templates
add optional support for xdg_config|cache_dir
Julien Rabinow -
Show More
@@ -54,8 +54,7 b' def get_ipython_dir() -> str:'
54 54 warn(('{0} is deprecated. Move link to {1} to '
55 55 'get rid of this message').format(cu(xdg_ipdir), cu(ipdir)))
56 56 else:
57 warn('Moving {0} to {1}'.format(cu(xdg_ipdir), cu(ipdir)))
58 shutil.move(xdg_ipdir, ipdir)
57 ipdir = xdg_ipdir
59 58
60 59 ipdir = os.path.normpath(os.path.expanduser(ipdir))
61 60
@@ -223,7 +223,7 b' def get_xdg_dir():'
223 223
224 224 env = os.environ
225 225
226 if os.name == 'posix' and sys.platform != 'darwin':
226 if os.name == "posix":
227 227 # Linux, Unix, AIX, etc.
228 228 # use ~/.config if empty OR not set
229 229 xdg = env.get("XDG_CONFIG_HOME", None) or os.path.join(get_home_dir(), '.config')
@@ -242,7 +242,7 b' def get_xdg_cache_dir():'
242 242
243 243 env = os.environ
244 244
245 if os.name == 'posix' and sys.platform != 'darwin':
245 if os.name == "posix":
246 246 # Linux, Unix, AIX, etc.
247 247 # use ~/.cache if empty OR not set
248 248 xdg = env.get("XDG_CACHE_HOME", None) or os.path.join(get_home_dir(), '.cache')
General Comments 0
You need to be logged in to leave comments. Login now