nit(#150): fix misleading 'this is unreachable' in Lstat comment
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user