Skip to content

Commit bc8b187

Browse files
authored
yield only if file
1 parent f1ec752 commit bc8b187

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

git/index/base.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -377,8 +377,8 @@ def raise_exc(e):
377377
continue
378378
# end check symlink
379379

380-
# if abs_path exists, yield it
381-
if os.path.exists(abs_path):
380+
# if abs_path exists and is a file, yield it
381+
if os.path.exists(abs_path) and os.path.isfile(abs_path):
382382
# even if the path contains special characters like ?*[ (glob)
383383
# if it exists, we take it
384384
yield abs_path

0 commit comments

Comments
 (0)