Martin Dørum преди 5 години
родител
ревизия
3f194797ed
променени са 1 файла, в които са добавени 4 реда и са изтрити 2 реда
  1. 4
    2
      src/sys.cc

+ 4
- 2
src/sys.cc Целия файл

@@ -18,6 +18,8 @@

namespace sys {

static thread_local std::unordered_set<std::string> mkdirp_set;

FileInfo fileInfo(const std::string &path) {
FileInfo finfo;

@@ -46,8 +48,7 @@ bool fileExists(const std::string &path) {
}

void mkdirp(const std::string &path) {
static thread_local std::unordered_set<std::string> set;
auto res = set.emplace(path);
auto res = mkdirp_set.emplace(path);
if (!res.second)
return;

@@ -61,6 +62,7 @@ void mkdirp(const std::string &path) {
}

void rmrf(const std::string &path) {
mkdirp_set.erase(path);
// TODO: Implement this in C++ instead
std::vector<std::string> argv;
argv.push_back("rm");

Loading…
Отказ
Запис