Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove trailing system path separator from pattern
Shell completion often adds a separator '/' after directory names. Because os.walk() return paths without a trailing separator, we have to remove trailing separators from patterns to ensure a proper match. Granted, we could attempt to remove the trailing separator '/' only from "directory patterns", not from "file patterns", but patterns are currently just patterns - we do not distinguish between "file patterns" and "directory patterns". A future improvment could be to interpret a pattern with a trailing "/" as "directory pattern", but then how would we define a "file pattern"? It's probably better to find a different mechanism and keep discarding the trailing separator from patterns.
- Loading branch information