Skip to content

Commit 910bca9

Browse files
Rob Phoenixjonathanslenders
authored andcommitted
Check for symlink when creating config dir.
Fixes prompt-toolkit#141
1 parent a451952 commit 910bca9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ptpython/entry_points/run_ptipython.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def run():
2727
config_dir = os.path.expanduser(a['--config-dir'] or '~/.ptpython/')
2828

2929
# Create config directory.
30-
if not os.path.isdir(config_dir):
30+
if not os.path.isdir(config_dir) or not os.path.islink(config_dir):
3131
os.mkdir(config_dir)
3232

3333
# If IPython is not available, show message and exit here with error status

ptpython/entry_points/run_ptpython.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def run():
3232
config_dir = os.path.expanduser(a['--config-dir'] or '~/.ptpython/')
3333

3434
# Create config directory.
35-
if not os.path.isdir(config_dir):
35+
if not os.path.isdir(config_dir) or not os.path.islink(config_dir):
3636
os.mkdir(config_dir)
3737

3838
# Startup path

0 commit comments

Comments
 (0)