isn't `path` a string? String indexOf is totally fine, and weird that we'd use the array version on it