X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ffs%2Futils.cpp;h=a34dd4e54ca86d6baf72a877cea30d6daa959c91;hb=4b326cb4916d981d48a2997df3d82b6b3b7b6b92;hp=d34a750903a45dd64864e11f56cd48947a097fb9;hpb=19edaf3b45bc4c23459fc8ddd552dcfa33eecc71;p=libs%2Fcore.git diff --git a/source/fs/utils.cpp b/source/fs/utils.cpp index d34a750..a34dd4e 100644 --- a/source/fs/utils.cpp +++ b/source/fs/utils.cpp @@ -1,10 +1,8 @@ #include -#include #ifndef WIN32 -#include -#else -#include +#include #endif +#include #include #include "dir.h" #include "path.h" @@ -114,8 +112,7 @@ Path realpath(const Path &path) Path next = real/queue.front(); queue.pop_front(); - struct stat st = lstat(next); - if(S_ISLNK(st.st_mode)) + if(is_link(next)) { if(++n_links>64) throw runtime_error("too many symbolic links");