Initialize deque with path string (#48734)
This commit is contained in:
parent
b8e448afa0
commit
cc9e0137df
@ -1472,7 +1472,7 @@ def set_executable(path):
|
||||
def recursive_mtime_greater_than(path: str, time: float) -> bool:
|
||||
"""Returns true if any file or dir recursively under `path` has mtime greater than `time`."""
|
||||
# use bfs order to increase likelihood of early return
|
||||
queue: Deque[str] = collections.deque(path)
|
||||
queue: Deque[str] = collections.deque([path])
|
||||
|
||||
if os.stat(path).st_mtime > time:
|
||||
return True
|
||||
|
Loading…
Reference in New Issue
Block a user