Message225914
| Author | joca.bt |
|---|---|
| Recipients | joca.bt |
| Date | 2014-08-26.11:37:22 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1409053042.7.0.771163532868.issue22276@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
Both fnmatch and glob support the "*/" glob. However, pathlib does not seem to handle this kind of globs correctly.
dir = Path("/a/directory/")
file = Path("/a/file")
print(dir.match("*/")) # True
print(file.match("*/")) # True
The "/" is being discarded by the match, resulting in incorrect matches.
Both the fnmatch and glob libraries support this correct.
print(fnmatch("/a/directory/", "*/")) # True
print(fnmatch("/a/file", "*/")) # False
Issue 21039 may be related to this. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2014-08-26 11:37:22 | joca.bt | set | recipients: + joca.bt |
| 2014-08-26 11:37:22 | joca.bt | set | messageid: <1409053042.7.0.771163532868.issue22276@psf.upfronthosting.co.za> |
| 2014-08-26 11:37:22 | joca.bt | link | issue22276 messages |
| 2014-08-26 11:37:22 | joca.bt | create | |