Make PathFilter's filter tolerant to empty strings
Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
This commit is contained in:
@@ -44,7 +44,7 @@ class PathFilter:
|
||||
def filter(self, path):
|
||||
R_CH = '_'
|
||||
if self._dot:
|
||||
if path[0] == '.':
|
||||
if path[:1] == '.': # Slicing tolerant to empty strings
|
||||
path = R_CH + path[1:]
|
||||
if self._posix:
|
||||
path = re.sub(r'[\/\x00]', R_CH, path)
|
||||
|
||||
Reference in New Issue
Block a user