{"record":{"id":"7dee70bde1d3a0ab","repo":"nikivdev/code","slug":"source-path-is-not-a-directory","errorCode":null,"errorMessage":"Source path is not a directory: {}","messagePattern":"Source path is not a directory: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/code.rs","lineNumber":285,"sourceCode":"    from: &Path,\n    target: &Path,\n    copy: bool,\n    dry_run: bool,\n    skip_claude: bool,\n    skip_codex: bool,\n) -> Result<()> {\n    let target_display = target.display().to_string();\n    let action = if copy { \"copy\" } else { \"move\" };\n    let action_past = if copy { \"Copied\" } else { \"Moved\" };\n\n    if from == target {\n        bail!(\"Source and destination are the same path.\");\n    }\n    if !from.exists() {\n        bail!(\"Source folder does not exist: {}\", from.display());\n    }\n    if !from.is_dir() {\n        bail!(\"Source path is not a directory: {}\", from.display());\n    }\n    if target.exists() {\n        bail!(\"Destination already exists: {}\", target.display());\n    }\n    if target.starts_with(from) {\n        bail!(\"Destination cannot be inside the source folder.\");\n    }\n\n    // Create parent directories if needed\n    if let Some(parent) = target.parent() {\n        if !parent.exists() {\n            if dry_run {\n                println!(\"Would create {}\", parent.display());\n            } else {\n                fs::create_dir_all(parent)\n                    .with_context(|| format!(\"failed to create {}\", parent.display()))?;\n            }\n        }","sourceCodeStart":267,"sourceCodeEnd":303,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/code.rs#L267-L303","documentation":"Error \"Source path is not a directory: {}\" thrown in nikivdev/code.","triggerScenarios":"Thrown at src/code.rs:285 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}