Skip to content

Commit

Permalink
Remove static initialization of the homedir and the logging if it's n…
Browse files Browse the repository at this point in the history
…ot found. (#2960)

Co-authored-by: Connor Manning <connor@hobu.co>
  • Loading branch information
abellgithub and connormanning committed Mar 6, 2020
1 parent e592ac8 commit 5c2f883
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions vendor/arbiter/arbiter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -978,7 +978,6 @@ namespace
if (homeDrive && homePath) s = *homeDrive + *homePath;
}
#endif
if (s.empty()) std::cout << "No home directory found" << std::endl;

return s;
}
Expand Down Expand Up @@ -1297,9 +1296,9 @@ std::vector<std::string> glob(std::string path)
std::string expandTilde(std::string in)
{
std::string out(in);
static std::string home(getHome());
if (!in.empty() && in.front() == '~')
{
const std::string home = getHome();
if (home.empty()) throw ArbiterError("No home directory found");
out = home + in.substr(1);
}
Expand Down Expand Up @@ -2566,10 +2565,10 @@ namespace
std::string m_object;

};

// https://cloud.google.com/storage/docs/json_api/#encoding
const char GResource::exclusions[] = "!$&'()*+,;=:@";

} // unnamed namespace

namespace drivers
Expand Down

0 comments on commit 5c2f883

Please sign in to comment.