Skip to content

Commit

Permalink
Fix realpath invocation.
Browse files Browse the repository at this point in the history
  • Loading branch information
abellgithub committed Jul 21, 2020
1 parent 1ce9f1c commit 6f2dee1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pdal/util/FileUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,12 @@ std::string toCanonicalPath(std::string filename)
if (GetFullPathName(filename.c_str(), MAX_PATH, buf, NULL))
result = buf;
#else
char buf[PATH_MAX];
if (realpath(filename.c_str(), buf))
char *buf = realpath(filename.c_str(), NULL);
if (buf)
{
result = buf;
free(buf);
}
#endif
return result;
}
Expand Down

0 comments on commit 6f2dee1

Please sign in to comment.