Commit ef1ec4d
utils: use lstat() instead of stat() in ensure_file()
ensure_file() checks !S_ISLNK to reject symlinks as bind-mount
destinations, but uses stat() which follows symlinks. Since stat()
resolves the symlink before returning, S_ISLNK is never true for
valid symlinks, making the check dead code.
Use lstat() so the S_ISLNK check works as intended.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Dariush Wahdany <86673488+dwahdany@users.noreply.github.com>1 parent 0c408e1 commit ef1ec4d
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
513 | 513 | | |
514 | 514 | | |
515 | 515 | | |
516 | | - | |
| 516 | + | |
517 | 517 | | |
518 | 518 | | |
519 | 519 | | |
| |||
0 commit comments