From 6fb17986923c735c7dc945847cc904e5dbb37fa7 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Wed, 10 Jan 2018 23:32:36 -0800 Subject: [PATCH] Use @ as escape character of cache filenames Fixes #112 --- src/utils.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils.cc b/src/utils.cc index 641cde46..31b8a2ce 100644 --- a/src/utils.cc +++ b/src/utils.cc @@ -224,9 +224,9 @@ void EnsureEndsInSlash(std::string& path) { std::string EscapeFileName(std::string path) { if (path.size() && path.back() == '/') path.pop_back(); - std::replace(path.begin(), path.end(), '\\', '_'); - std::replace(path.begin(), path.end(), '/', '_'); - std::replace(path.begin(), path.end(), ':', '_'); + std::replace(path.begin(), path.end(), '\\', '@'); + std::replace(path.begin(), path.end(), '/', '@'); + std::replace(path.begin(), path.end(), ':', '@'); return path; }