Skip to content

Commit

Permalink
Fix crash in goesproc when an absolute path is used
Browse files Browse the repository at this point in the history
  • Loading branch information
JVital2013 committed Oct 17, 2023
1 parent 7229509 commit d0805db
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/util/fs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,15 @@ void mkdirp(const std::string& path) {
continue;
}
auto sub = path.substr(0, pos);
auto rv = _mkdir(sub.c_str());
if (rv == -1 && errno != EEXIST) {
perror("mkdir");
ASSERT(rv == 0);
if (sub.back() != ':')
{
auto rv = _mkdir(sub.c_str());
if (rv == -1 && errno != EEXIST) {
perror("mkdir");
ASSERT(rv == 0);
}
}

if (pos == std::string::npos) {
break;
}
Expand Down

0 comments on commit d0805db

Please sign in to comment.