Fix Bad Error

This commit is contained in:
TheBrokenRail 2024-09-22 22:22:32 -04:00
parent 65ee4d8a78
commit 00d193e732

View File

@ -26,7 +26,9 @@ void chop_last_component(std::string &str) {
// Get Binary Directory (Remember To Free) // Get Binary Directory (Remember To Free)
std::string safe_realpath(const std::string &path) { std::string safe_realpath(const std::string &path) {
char *raw = realpath(path.c_str(), nullptr); char *raw = realpath(path.c_str(), nullptr);
ALLOC_CHECK(raw); if (raw == nullptr) {
ERR("Unable To Resolve: %s", path.c_str());
}
std::string str = raw; std::string str = raw;
free(raw); free(raw);
return str; return str;