nikivdev/code · error
Source path is not a directory: {}
Error message
Source path is not a directory: {} What it means
Error "Source path is not a directory: {}" thrown in nikivdev/code.
Source
Thrown at src/code.rs:285
from: &Path,
target: &Path,
copy: bool,
dry_run: bool,
skip_claude: bool,
skip_codex: bool,
) -> Result<()> {
let target_display = target.display().to_string();
let action = if copy { "copy" } else { "move" };
let action_past = if copy { "Copied" } else { "Moved" };
if from == target {
bail!("Source and destination are the same path.");
}
if !from.exists() {
bail!("Source folder does not exist: {}", from.display());
}
if !from.is_dir() {
bail!("Source path is not a directory: {}", from.display());
}
if target.exists() {
bail!("Destination already exists: {}", target.display());
}
if target.starts_with(from) {
bail!("Destination cannot be inside the source folder.");
}
// Create parent directories if needed
if let Some(parent) = target.parent() {
if !parent.exists() {
if dry_run {
println!("Would create {}", parent.display());
} else {
fs::create_dir_all(parent)
.with_context(|| format!("failed to create {}", parent.display()))?;
}
}View on GitHub (pinned to a747e741ae)
When it happens
Trigger: Thrown at src/code.rs:285 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of nikivdev/code@a747e741ae (2026-09-01).
Data as JSON: /api/errors/7dee70bde1d3a0ab.
Report an issue: GitHub.