mirror of
https://github.com/facebook/proxygen.git
synced 2025-08-07 07:02:53 +03:00
convert a path to valid glob syntax when prefetching
Summary: Paths are not necessarily legal glob syntax. In particular, backslash is used for escaping. This caused problems on Windows, where we tried to pass a backslash-delimited path into `eden prefetch --no-prefetch`. Reviewed By: xavierd Differential Revision: D25072784 fbshipit-source-id: 9ce8e5ccc8f28581512c39d04922889da0bc1bf6
This commit is contained in:
committed by
Facebook GitHub Bot
parent
c348038e4f
commit
bb1f43f913
@@ -59,11 +59,9 @@ def prefetch_dir_if_eden(dirpath):
|
|||||||
root = find_eden_root(dirpath)
|
root = find_eden_root(dirpath)
|
||||||
if root is None:
|
if root is None:
|
||||||
return
|
return
|
||||||
rel = os.path.relpath(dirpath, root)
|
glob = f"{os.path.relpath(dirpath, root).replace(os.sep, '/')}/**"
|
||||||
print("Prefetching %s..." % rel)
|
print(f"Prefetching {glob}")
|
||||||
subprocess.call(
|
subprocess.call(["edenfsctl", "prefetch", "--repo", root, "--silent", glob])
|
||||||
["edenfsctl", "prefetch", "--repo", root, "--silent", "%s/**" % rel]
|
|
||||||
)
|
|
||||||
PREFETCHED_DIRS.add(dirpath)
|
PREFETCHED_DIRS.add(dirpath)
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user