diff --git a/src/libutil/file-system.cc b/src/libutil/file-system.cc index 1611ed8622a..249b0692eb2 100644 --- a/src/libutil/file-system.cc +++ b/src/libutil/file-system.cc @@ -469,14 +469,15 @@ void createDirs(const std::filesystem::path & path) AutoDelete::AutoDelete() : del{false} + , recursive(false) { } AutoDelete::AutoDelete(const std::filesystem::path & p, bool recursive) : _path(p) + , del(true) + , recursive(recursive) { - del = true; - this->recursive = recursive; } void AutoDelete::deletePath() diff --git a/src/libutil/unix/file-descriptor.cc b/src/libutil/unix/file-descriptor.cc index 756fa0159c6..ae3528eb503 100644 --- a/src/libutil/unix/file-descriptor.cc +++ b/src/libutil/unix/file-descriptor.cc @@ -404,7 +404,7 @@ OsString readLinkAt(Descriptor dirFd, const CanonPath & path) buf.resize(bufSize); ssize_t rlSize = ::readlinkat(dirFd, path.rel_c_str(), buf.data(), bufSize); if (rlSize == -1) - throw SysError("reading symbolic link '%1%'", path); + throw SysError("reading symbolic link '%1%' relative to parent directory", path.rel()); else if (rlSize < bufSize) return {buf.data(), static_cast(rlSize)}; }