equal
deleted
inserted
replaced
464 else: |
464 else: |
465 return False |
465 return False |
466 return True |
466 return True |
467 |
467 |
468 def isignoreddir(localpath): |
468 def isignoreddir(localpath): |
469 """ |
469 """Return True if `localpath` directory is ignored or contains only |
470 This function checks whether the directory contains only ignored files |
470 ignored files and should hence be considered ignored. |
471 and hence should the directory be considered ignored. Returns True, if |
|
472 that should be ignored otherwise False. |
|
473 """ |
471 """ |
474 dirpath = os.path.join(root, localpath) |
472 dirpath = os.path.join(root, localpath) |
|
473 if ignorefn(dirpath): |
|
474 return True |
475 for f in os.listdir(dirpath): |
475 for f in os.listdir(dirpath): |
476 filepath = os.path.join(dirpath, f) |
476 filepath = os.path.join(dirpath, f) |
477 if os.path.isdir(filepath): |
477 if os.path.isdir(filepath): |
478 # recursion here |
478 # recursion here |
479 ret = isignoreddir(os.path.join(localpath, f)) |
479 ret = isignoreddir(os.path.join(localpath, f)) |