From 8afc07fb2bb9ec3d0bc01f87e0823f8baa8e8c70 Mon Sep 17 00:00:00 2001 From: Bastian Kleineidam Date: Sun, 7 Mar 2010 10:44:42 +0100 Subject: [PATCH] Expand filenames given with the --config options. --- doc/changelog.txt | 1 + linkchecker | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/changelog.txt b/doc/changelog.txt index ccc80720..ad4c6cd4 100644 --- a/doc/changelog.txt +++ b/doc/changelog.txt @@ -18,6 +18,7 @@ Fixes: to RFC2368. So the syntax error about missing email-addresses gets demoted to a warning. Closes: SF bug #2910588 +- cmdline: Expand tilde (~) in filenames given with the --config option. 5.1 "Let the right one in" (released 04.08.2009) diff --git a/linkchecker b/linkchecker index 4f18c27e..ac4f9a96 100755 --- a/linkchecker +++ b/linkchecker @@ -591,8 +591,9 @@ log.debug(LOG_CMDLINE, _("Python %(version)s on %(platform)s") % \ try: files = [] if options.configfile: - if os.path.isfile(options.configfile): - files.append(options.configfile) + path = linkcheck.configuration.normpath(options.configfile) + if os.path.isfile(path): + files.append(path) else: log.warn(LOG_CMDLINE, _("Unreadable config file: %r"), options.configfile)