Skip to content

Commit

Permalink
Tighten up flow of jupyterDataDir
Browse files Browse the repository at this point in the history
  • Loading branch information
rgbkrk committed May 23, 2015
1 parent 1e8a792 commit b302b46
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions lib/paths.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -49,24 +49,19 @@ jupyterConfigDir = ->
jupyterDataDir = ->
if process.env['JUPYTER_DATA_DIR']
return process.env['JUPYTER_DATA_DIR']

# Windows first for easier testing
if process.platform == 'win32'
else if process.platform == 'win32'
appData = process.env['APPDATA']
if appData
return path.join appData, 'jupyter'
else
return path.join jupyterConfigDir(), 'data'

home = userHome()

if process.platform == 'darwin'
return path.join(home, 'Library', 'Jupyter')
else if process.platform == 'darwin'
return path.join(userHome(), 'Library', 'Jupyter')
else
# Linux, non-OS X Unix, AIX, etc.
xdg = process.env['XDG_DATA_HOME']
if not xdg
xdg = path.join(home, '.local', 'share')
xdg = path.join(userHome(), '.local', 'share')
return path.join(xdg, 'jupyter')


Expand Down

0 comments on commit b302b46

Please sign in to comment.