diff --git a/src/system/helpers.cpp b/src/system/helpers.cpp index e6e4a1e2e..59d64524a 100644 --- a/src/system/helpers.cpp +++ b/src/system/helpers.cpp @@ -1272,3 +1272,13 @@ std::string Lang2ISO639_1(std::string& lang) return ret; } + +string readLink(string lnk) +{ + char buf[PATH_MAX]; + memset(buf, 0, sizeof(buf)-1); + if (readlink(lnk.c_str(), buf, sizeof(buf)-1) != -1) + return (string)buf; + + return ""; +} diff --git a/src/system/helpers.h b/src/system/helpers.h index e117e011e..c7f3ae06a 100644 --- a/src/system/helpers.h +++ b/src/system/helpers.h @@ -148,5 +148,6 @@ bool split_config_string(const std::string &str, std::map