X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Ffs%2Futils.cpp;h=a34dd4e54ca86d6baf72a877cea30d6daa959c91;hp=d34a750903a45dd64864e11f56cd48947a097fb9;hb=9ef362fabde5092288a8f59e6dae503c83a9462c;hpb=19edaf3b45bc4c23459fc8ddd552dcfa33eecc71 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");