mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-16 12:21:13 +00:00
Add trailing dot when creating user configuration directory on Windows.
This commit is contained in:
parent
89e163759a
commit
2d6cfb238f
1 changed files with 4 additions and 0 deletions
|
|
@ -467,6 +467,10 @@ def get_user_config():
|
|||
try:
|
||||
userdir = os.path.dirname(userconf)
|
||||
if not os.path.isdir(userdir):
|
||||
if os.name == 'nt':
|
||||
# Windows forbids filenames with leading dot unless
|
||||
# a trailing dot is added.
|
||||
userdir += "."
|
||||
os.mkdir(userdir, 0700)
|
||||
shutil.copy(initialconf, userconf)
|
||||
except StandardError, errmsg:
|
||||
|
|
|
|||
Loading…
Reference in a new issue