1
0
mirror of https://github.com/facebook/proxygen.git synced 2025-08-05 19:55:47 +03:00

speed up file copy on windows

Summary:
X-link: https://github.com/facebookincubator/fizz/pull/155

X-link: https://github.com/facebookincubator/zstrong/pull/1085

getdeps windows file copy is very slow, speed it up

Reviewed By: bigfootjon

Differential Revision: D66830544

fbshipit-source-id: 43213e258c71ae706bb059600619e276e7491a90
This commit is contained in:
Alex Hornby
2024-12-06 01:30:06 -08:00
committed by Facebook GitHub Bot
parent 8f72b80c14
commit 18fefedec8
3 changed files with 37 additions and 18 deletions

View File

@@ -18,6 +18,7 @@ import typing
from shlex import quote as shellquote
from typing import Optional
from .copytree import simple_copytree
from .dyndeps import create_dyn_dep_munger
from .envfuncs import add_path_entry, Env, path_search
from .fetcher import copy_if_different
@@ -1329,7 +1330,7 @@ class NopBuilder(BuilderBase):
os.makedirs(dest_parent)
if os.path.isdir(full_src):
if not os.path.exists(full_dest):
shutil.copytree(full_src, full_dest)
simple_copytree(full_src, full_dest)
else:
shutil.copyfile(full_src, full_dest)
shutil.copymode(full_src, full_dest)
@@ -1341,7 +1342,7 @@ class NopBuilder(BuilderBase):
os.chmod(full_dest, st.st_mode | stat.S_IXUSR)
else:
if not os.path.exists(self.inst_dir):
shutil.copytree(self.src_dir, self.inst_dir)
simple_copytree(self.src_dir, self.inst_dir)
class SqliteBuilder(BuilderBase):