Update build_directory_md.py (#2066)

Propagate argument `top_dir` to good_file_paths.
Previously this argument did not get passed to the helper function when calling print_directory_md.
This commit is contained in:
Martin Röbke 2020-06-02 21:14:12 +02:00 committed by GitHub
parent d7cc778092
commit 35319a2a2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,7 +31,7 @@ def print_path(old_path: str, new_path: str) -> str:
def print_directory_md(top_dir: str = ".") -> None:
old_path = ""
for filepath in sorted(good_file_paths()):
for filepath in sorted(good_file_paths(top_dir)):
filepath, filename = os.path.split(filepath)
if filepath != old_path:
old_path = print_path(old_path, filepath)