Skip to content

Commit

Permalink
Experiment: lowercase the appname for aix and linux
Browse files Browse the repository at this point in the history
At least some directories in unix are conventionally lowercase, so experiment with that convention.
  • Loading branch information
jasongrout committed Sep 27, 2022
1 parent b556baa commit 58565fb
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions jupyter_core/paths.py
Expand Up @@ -24,6 +24,9 @@
from jupyter_core.utils import deprecation

pjoin = os.path.join
APPNAME = "Jupyter"
if sys.platform.startswith("linux") or sys.platform.startswith("aix"):
APPNAME = APPNAME.lower()

# UF_HIDDEN is a stat flag not defined in the stat module.
# It is used by BSD to indicate hidden files.
Expand Down Expand Up @@ -110,7 +113,7 @@ def jupyter_config_dir():
return env["JUPYTER_CONFIG_DIR"]

if use_platform_dirs():
return platformdirs.user_config_dir("Jupyter", appauthor=False)
return platformdirs.user_config_dir(APPNAME, appauthor=False)

home_dir = get_home_dir()
return pjoin(home_dir, ".jupyter")
Expand All @@ -129,7 +132,7 @@ def jupyter_data_dir():
return env["JUPYTER_DATA_DIR"]

if use_platform_dirs():
return platformdirs.user_data_dir("Jupyter", False)
return platformdirs.user_data_dir(APPNAME, appauthor=False)

home = get_home_dir()

Expand Down Expand Up @@ -167,7 +170,7 @@ def jupyter_runtime_dir():

if use_platform_dirs():
SYSTEM_JUPYTER_PATH = platformdirs.site_data_dir(
"Jupyter", appauthor=False, multipath=True
APPNAME, appauthor=False, multipath=True
).split(os.pathsep)
else:
deprecation(
Expand Down Expand Up @@ -256,7 +259,7 @@ def jupyter_path(*subdirs):

if use_platform_dirs():
SYSTEM_CONFIG_PATH = platformdirs.site_config_dir(
"Jupyter", appauthor=False, multipath=True
APPNAME, appauthor=False, multipath=True
).split(os.pathsep)
else:
if os.name == "nt":
Expand Down

0 comments on commit 58565fb

Please sign in to comment.