Skip to content

Commit

Permalink
RMG-Core: remove unused function in Directories.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosalie241 committed Mar 25, 2024
1 parent dcfcf8b commit a6da96c
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions Source/RMG-Core/Directories.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,34 +123,6 @@ static std::filesystem::path get_var_directory(std::string var, std::string appe

return directory.make_preferred();
}

static std::filesystem::path get_command_output(std::string command)
{
std::string output;
char buf[2048];
FILE* pipe = nullptr;

pipe = popen(command.c_str(), "r");
if (pipe == nullptr)
{
return std::string();
}

while (fgets(buf, sizeof(buf), pipe) != nullptr)
{
output += buf;
}

pclose(pipe);

// strip newline
if (output.back() == '\n')
{
output.pop_back();
}

return output;
}
#endif // _WIN32

//
Expand Down

0 comments on commit a6da96c

Please sign in to comment.