Fix #2193: shutil.SameFileError if source directory and destination directory are same

This commit is contained in:
Takeshi KOMIYA 2015-12-26 01:44:40 +09:00
parent 66ef8102c4
commit 9c2704b705
2 changed files with 5 additions and 0 deletions

View File

@ -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)

View File

@ -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