Try more Windows fix?

This commit is contained in:
David Given
2025-07-28 12:23:41 +01:00
parent 06b126a2e7
commit b5eaec0778
2 changed files with 7 additions and 8 deletions

View File

@@ -30,7 +30,12 @@ def protoencode_single(self, name, srcs: Targets, proto, symbol):
ins=srcs,
outs=[f"={name}.cc"],
deps=[r],
commands=["$[deps[0]] $[ins] $[outs] " + symbol],
commands=[
# Materialise symbolic links (for Windows).
"cp -L $[ins[0]] $[ins[0]].real",
"mv $[ins[0]].real $[ins[0]]",
"$[deps[0]] $[ins] $[outs] " + symbol
],
label="PROTOENCODE",
)

View File

@@ -72,13 +72,7 @@ int main(int argc, const char* argv[])
{
PROTO message;
std::string filename = argv[1];
#if defined _WIN32
for (char& b : filename)
if (b == '/')
b = '\\';
#endif
std::ifstream input(filename);
std::ifstream input(argv[1]);
if (!input)
{
perror("couldn't open input file");