]> git.tdb.fi Git - libs/core.git/blobdiff - source/fs/utils.cpp
Rewrite the stat functions to expose a platform-independent interface
[libs/core.git] / source / fs / utils.cpp
index e3c09fde6e79aa9c3d446d060a377ebeb8771ba8..b66b82dd70c90c1ed96b6f0cd13a27087ad4ebf5 100644 (file)
@@ -109,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");