Skip to content

Commit

Permalink
submit.py now checks its real path for .kattisrc, allowing symlinks
Browse files Browse the repository at this point in the history
  • Loading branch information
E-M-Bailey committed Aug 31, 2024
1 parent f24ef4b commit 2582eee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ def get_config():
cfg.read(_DEFAULT_CONFIG)

if not cfg.read([os.path.join(os.path.expanduser("~"), '.kattisrc'),
os.path.join(os.path.dirname(sys.argv[0]), '.kattisrc')]):
os.path.join(os.path.dirname(sys.argv[0]), '.kattisrc'),
os.path.join(os.path.dirname(os.path.realpath(__file__)), '.kattisrc')]):
raise ConfigError('''\
I failed to read in a config file from your home directory or from the
same directory as this script. To download a .kattisrc file please visit
Expand Down

0 comments on commit 2582eee

Please sign in to comment.