fixed treatment of patterns with an empty path