mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-27 15:32:52 +02:00
src/system/helpers.cpp: Add function readLink()
Origin commit data
------------------
Branch: ni/coolstream
Commit: 0c182785e2
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2017-02-22 (Wed, 22 Feb 2017)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -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 "";
|
||||
}
|
||||
|
Reference in New Issue
Block a user