{"record":{"id":"a88232acd2204ecd","repo":"Hmbown/CodeWhale","slug":"plugin-directory-is-a-reparse-point-or-non-directo","errorCode":null,"errorMessage":"plugin directory is a reparse point or non-directory","messagePattern":"plugin directory is a reparse point or non-directory","errorType":"validation","errorClass":"std::io::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/plugins/manifest.rs","lineNumber":1572,"sourceCode":"#[cfg(all(not(unix), not(windows)))]\npub(crate) fn open_bundle_file(path: &Path) -> std::io::Result<fs::File> {\n    fs::File::open(path)\n}\n\n#[cfg(windows)]\nfn open_bundle_directory(path: &Path) -> std::io::Result<fs::File> {\n    use std::os::windows::fs::OpenOptionsExt as _;\n\n    const FILE_ATTRIBUTE_REPARSE_POINT: u32 = 0x0000_0400;\n    let file = fs::OpenOptions::new()\n        .read(true)\n        .share_mode(0x0000_0001)\n        .custom_flags(0x0220_0000) // BACKUP_SEMANTICS | OPEN_REPARSE_POINT\n        .open(path)?;\n    let metadata = file.metadata()?;\n    let identity = windows_file_identity(&file)?;\n    if !metadata.is_dir() || identity.attributes & FILE_ATTRIBUTE_REPARSE_POINT != 0 {\n        return Err(std::io::Error::new(\n            std::io::ErrorKind::InvalidData,\n            \"plugin directory is a reparse point or non-directory\",\n        ));\n    }\n    Ok(file)\n}\n\n/// Reopen a reviewed path only to compare its current handle identity with a\n/// retained authority handle. Desired access is zero and sharing is permissive\n/// because the retained handle remains responsible for denying writes and\n/// replacement throughout the comparison.\n#[cfg(windows)]\npub(crate) fn open_bundle_identity_probe(\n    path: &Path,\n    expect_directory: bool,\n) -> std::io::Result<fs::File> {\n    use std::os::windows::fs::OpenOptionsExt as _;\n","sourceCodeStart":1554,"sourceCodeEnd":1590,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/tui/src/plugins/manifest.rs#L1554-L1590","documentation":"Hardening guard in open_bundle_directory (Windows): the opened plugin directory path has the reparse-point attribute or is not actually a directory, so it is rejected. Plugin directories must be real directories to prevent junction/symlink redirection.","triggerScenarios":"Thrown at crates/tui/src/plugins/manifest.rs:1572 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the junction/symlink and install the plugin as a real directory.","Re-install the plugin through the normal plugin flow so a genuine directory is created.","Check the plugin root for virtualization or redirection layers."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0c42157ee52f9d55af2b506d71b46249910f77d3","analyzedAt":"2026-08-20T21:50:45.477Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}