Skip to content

Commit

Permalink
untar: don't compare when a dir doesn't exist
Browse files Browse the repository at this point in the history
Fixes issues in WebAssembly#112.
  • Loading branch information
jfbastien committed Jan 17, 2016
1 parent 7ec2f95 commit c01ef41
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/support.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ def _files_same(dir1, dir2, basenames):

def _dirs_same(dir1, dir2, basenames):
for d in basenames:
diff = filecmp.dircmp(os.path.join(dir1, d), os.path.join(dir2, d))
left = os.path.join(dir1, d)
right = os.path.join(dir2, d)
if not (os.path.isdir(left) and os.path.isdir(right)):
return False
diff = filecmp.dircmp(right, right)
if 0 != len(diff.left_only + diff.right_only + diff.diff_files +
diff.common_funny + diff.funny_files):
return False
Expand Down

0 comments on commit c01ef41

Please sign in to comment.