hrev56121 adds 1 changeset to branch 'master'
old head: 87db9cb2a6540747cecd3d92db7a419bede618b5
new head: f5dd7d3c7b1349b41bec520e7aaae4cda1ea2b3d
overview:
https://git.haiku-os.org/haiku/log/?qt=range&q=f5dd7d3c7b13+%5E87db9cb2a654
----------------------------------------------------------------------------
f5dd7d3c7b13: libroot_build: fix stat of files in a symlinked directory
Only manifested itself with the host build tools, where looking
up a file inside a directory that is a symlink would fail, as the
cached stat info in NodeRef would fail to match the stat info to
check that the path still exists, as `lstat` returned the stat info
of the resolved symlink. Replacing `lstat` with `stat` fixes the
mismatching stat information cached in the NodeRef.
* Fixes #17750
Change-Id: I7cc360dd4678d2c4cf1186e9f39490a6bfd946a2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5325
Tested-by: Commit checker robot <no-reply+buildbot@xxxxxxxxxxxx>
Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>
Reviewed-by: Alex von Gluck IV <kallisti5@xxxxxxxxxxx>
[ Jessica Hamilton <jessica.l.hamilton@xxxxxxxxx> ]
----------------------------------------------------------------------------
Revision: hrev56121
Commit: f5dd7d3c7b1349b41bec520e7aaae4cda1ea2b3d
URL: https://git.haiku-os.org/haiku/commit/?id=f5dd7d3c7b13
Author: Jessica Hamilton <jessica.l.hamilton@xxxxxxxxx>
Date: Fri May 20 16:08:35 2022 UTC
Committer: Alex von Gluck IV <kallisti5@xxxxxxxxxxx>
Commit-Date: Fri May 20 17:19:28 2022 UTC
Ticket: https://dev.haiku-os.org/ticket/17750
----------------------------------------------------------------------------
1 file changed, 1 insertion(+), 1 deletion(-)
src/build/libroot/fs.cpp | 2 +-
----------------------------------------------------------------------------
diff --git a/src/build/libroot/fs.cpp b/src/build/libroot/fs.cpp
index 3eed597060..0e1cc40aa4 100644
--- a/src/build/libroot/fs.cpp
+++ b/src/build/libroot/fs.cpp
@@ -369,7 +369,7 @@ get_path(const NodeRef *ref, const char *name, string &path)
// stat the path to check, if it is still valid
struct stat st;
- if (lstat(path.c_str(), &st) < 0) {
+ if (stat(path.c_str(), &st) < 0) {
sDirPathMap.erase(it);
return errno;
}