1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2026-01-22 14:41:39 +00:00

Fixed failing tests on Windows.

This commit is contained in:
Virgil Dupras
2011-09-29 19:23:35 +01:00
parent 75f0ed14aa
commit 26e496a051
2 changed files with 5 additions and 2 deletions

View File

@@ -316,7 +316,9 @@ class Results(Markable):
try:
do_write(outfile)
except IOError as e:
if e.errno == 21: # outfile is a directory
# If our IOError is because dest is already a directory, we want to handle that. 21 is
# the code we get on OS X and Linux, 13 is what we get on Windows.
if e.errno in {21, 13}:
p = str(outfile)
dirname, basename = op.split(p)
otherfiles = os.listdir(dirname)