Path queries: use {norm,sys}path on path.

Finishes #1385.
This commit is contained in:
Bruno Cauet 2015-04-01 09:54:30 +02:00
parent 8ae0317014
commit e374830cca

View file

@ -84,7 +84,8 @@ class PathQuery(dbcore.FieldQuery):
colon = query_part.find(':')
if colon != -1:
query_part = query_part[:colon]
return os.sep in query_part and os.path.exists(query_part)
return (os.sep in query_part
and os.path.exists(syspath(normpath(query_part))))
def match(self, item):
path = item.path if self.case_sensitive else item.path.lower()