Don’t Trust a Path Across Two Syscalls
Wasn't this a common knowledge among application developers? File system is volatile, and can change any time, do not assume persistence of it. I heard about the principle from ghcup developer a few years ago.