Merge pull request #21 from JaySon-Huang/master
use `realpath call` instead of `realpath program`
This commit is contained in:
commit
9874d12c35
|
@ -9,6 +9,7 @@
|
|||
=============================================================================*/
|
||||
|
||||
#include "Util.h"
|
||||
#include "limits.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
@ -887,10 +888,9 @@ Util::getSystemOutput(string cmd)
|
|||
string
|
||||
Util::getExactPath(const char *str)
|
||||
{
|
||||
string cmd = "realpath ";
|
||||
cmd += string(str);
|
||||
|
||||
return getSystemOutput(cmd);
|
||||
char resolved_path[PATH_MAX];
|
||||
realpath(str, resolved_path);
|
||||
return resolved_path;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in New Issue