Verified Commit 26fac871 authored by Tommaso Tocci's avatar Tommaso Tocci
Browse files

path resol: use symlink size for readlink

parent cc4226fe
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -111,7 +111,7 @@ bool resolve_path (const std::string& path, std::string& resolved, bool resolve_
                if (!resolve_last_link && end == path.size()) {
                    continue;
                }
                char link_resolved[PATH_MAX_LEN];
                char link_resolved[st.st_size + 1];
                if (realpath(resolved.c_str(), link_resolved) == nullptr) {
                    CTX->log()->error("{}() Failed to get realpath for link '{}'. Error: {}", __func__, resolved, strerror(errno));
                    resolved.append(path, end, std::string::npos);