• achaiah's avatar
    [Fix]: fix missing check of directory in scandir (#1110) · 21845db4
    achaiah authored
    
    
    * Missing check for dir in the 'else' clause
    
    Fixing issue when recursively scanning directories with filenames starting with '.'  Without this fix, the `if not entry.name.startswith('.') and entry.is_file()` logic falls through to the `else` clause which in the current code base will error out as it encounters '.' files (e.g. .DS_Store)
    
    * Updated code per comments
    
    * fixing indentation
    
    * fix indenterror and add comment
    
    * remove .DS_Store and add .file
    Co-authored-by: default avatarzhouzaida <zhouzaida@163.com>
    21845db4
test_path.py 1.96 KB