fn diagnose_install_dir_error(
pkg: &InstalledPackage,
err: Error,
) -> DiagnosisResultExpand description
Translate a filesystem metadata failure into a user-facing diagnosis.
The error code depends on the error kind so the final report can distinguish missing directories, permission problems, and generic unreadable paths.