From 9c2704b705d9989ff235625fbf735c79b8086753 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sat, 26 Dec 2015 01:44:40 +0900 Subject: [PATCH] Fix #2193: shutil.SameFileError if source directory and destination directory are same --- CHANGES | 1 + sphinx/cmdline.py | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGES b/CHANGES index 8ac51f522..561d0f45c 100644 --- a/CHANGES +++ b/CHANGES @@ -20,6 +20,7 @@ Bugs fixed * #1480, #2188: LaTeX: Support math in section titles * #2071: Fix same footnote in more than two section titles => LaTeX/PDF Bug * #2040: Fix UnicodeDecodeError in sphinx-apidoc when author contains non-ascii characters +* #2193: Fix shutil.SameFileError if source directory and destination directory are same Release 1.3.3 (released Dec 2, 2015) diff --git a/sphinx/cmdline.py b/sphinx/cmdline.py index e411836c3..e9d76bb83 100644 --- a/sphinx/cmdline.py +++ b/sphinx/cmdline.py @@ -144,6 +144,10 @@ def main(argv): file=sys.stderr) return 1 outdir = abspath(args[1]) + if srcdir == outdir: + print('Error: source directory and destination directory are same.', + file=sys.stderr) + return 1 except IndexError: parser.print_help() return 1