This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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:22joca.btsetrecipients: + joca.bt
2014-08-26 11:37:22joca.btsetmessageid: <1409053042.7.0.771163532868.issue22276@psf.upfronthosting.co.za>
2014-08-26 11:37:22joca.btlinkissue22276 messages
2014-08-26 11:37:22joca.btcreate