X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ffs%2Futils.cpp;h=b66b82dd70c90c1ed96b6f0cd13a27087ad4ebf5;hb=427991f60b200fe4a6517e6fb1fe1980ab14983b;hp=d34a750903a45dd64864e11f56cd48947a097fb9;hpb=19edaf3b45bc4c23459fc8ddd552dcfa33eecc71;p=libs%2Fcore.git diff --git a/source/fs/utils.cpp b/source/fs/utils.cpp index d34a750..b66b82d 100644 --- a/source/fs/utils.cpp +++ b/source/fs/utils.cpp @@ -1,10 +1,5 @@ #include #include -#ifndef WIN32 -#include -#else -#include -#endif #include #include "dir.h" #include "path.h" @@ -114,8 +109,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");