nit(#150): fix misleading 'this is unreachable' in Lstat comment

This commit is contained in:
Rodin
2026-05-15 16:10:27 -07:00
parent 345f9a5aac
commit 6e11107c77
+2 -2
View File
@@ -50,8 +50,8 @@ func validateDocmapPath(localPath, resolvedRoot string) (string, error) {
return "", fmt.Errorf("cannot resolve path (symlink): %w", err)
}
// Lstat the resolved path — EvalSymlinks guarantees resolvedPath is
// symlink-free, so ModeSymlink can never be set here; this is unreachable.
// Lstat the resolved path for size and existence checks — EvalSymlinks
// guarantees no symlink components remain, so ModeSymlink can never be set.
fi, err := os.Lstat(resolvedPath)
if err != nil {
return "", fmt.Errorf("cannot stat file: %w", err)