use lstat for consistent behavior

master
Daniel Kolesa 2016-07-07 19:46:53 +01:00
parent 8b7fc0f791
commit 115da8be30
1 changed files with 2 additions and 1 deletions

View File

@ -130,6 +130,7 @@ struct FileInfo {
private:
void init_from_str(ConstCharRange path) {
/* TODO: implement a version that will follow symbolic links */
p_path = path;
#ifdef OSTD_PLATFORM_WIN32
WIN32_FILE_ATTRIBUTE_DATA attr;
@ -137,7 +138,7 @@ private:
attr.dwFileAttributes == INVALID_FILE_ATTRIBUTES)
#else
struct stat st;
if (stat(p_path.data(), &st) < 0)
if (lstat(p_path.data(), &st) < 0)
#endif
{
p_slash = p_dot = npos;