From 83001e6dbce0d11ca2fb13f09e087e49ccb3564d Mon Sep 17 00:00:00 2001 From: Raphael Schlarb Date: Sun, 16 Feb 2025 20:01:36 +0100 Subject: [PATCH] fix: ensure reloading of overwritten files - Include `st_link` in the file_stat hash to ensure that files are reloaded after being deleted and recreated. --- src/th_file.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/th_file.c b/src/th_file.c index 4f542ab..51e485c 100644 --- a/src/th_file.c +++ b/src/th_file.c @@ -280,6 +280,7 @@ th_file_stat_hash_posix(th_file* stream) hash = FSTAT_HASH_NEXT(hash, (uint32_t)st.st_ino); hash = FSTAT_HASH_NEXT(hash, (uint32_t)st.st_uid); hash = FSTAT_HASH_NEXT(hash, (uint32_t)st.st_gid); + hash = FSTAT_HASH_NEXT(hash, (uint32_t)(st.st_nlink != 0)); return hash; } #elif defined(TH_CONFIG_OS_WIN)