Reproducible example (on *nix/MacOS):
mkdir test_dir
touch test_dir/good_file.txt
touch test_dir/bad_\\trash.txt
th
th> for f in paths.iterfiles('./test_dir') do
..> print(f)
..> end
Output: good_file.txt only.
ls works correctly:
ls test_dir
> bad_\trash.txt good_file.txt