spacedriveapp/spacedrive · error
Both source and target must be directories
Error message
Both source and target must be directories
What it means
Error "Both source and target must be directories" thrown in spacedriveapp/spacedrive.
Source
Thrown at core/src/service/file_sync/conduit.rs:38
&self,
source_entry_id: i32,
target_entry_id: i32,
mode: sync_conduit::SyncMode,
schedule: String,
) -> Result<sync_conduit::Model> {
// Validate entries exist and are directories
let source = entry::Entity::find_by_id(source_entry_id)
.one(&*self.db)
.await?
.ok_or_else(|| anyhow::anyhow!("Source entry not found"))?;
let target = entry::Entity::find_by_id(target_entry_id)
.one(&*self.db)
.await?
.ok_or_else(|| anyhow::anyhow!("Target entry not found"))?;
if source.kind != 1 || target.kind != 1 {
return Err(anyhow::anyhow!(
"Both source and target must be directories"
));
}
// Check for duplicate conduits
let existing = sync_conduit::Entity::find()
.filter(sync_conduit::Column::SourceEntryId.eq(source_entry_id))
.filter(sync_conduit::Column::TargetEntryId.eq(target_entry_id))
.one(&*self.db)
.await?;
if existing.is_some() {
return Err(anyhow::anyhow!(
"Conduit already exists between these entries"
));
}
// Create conduitView on GitHub (pinned to 6dfeccf211)
When it happens
Trigger: Thrown at core/src/service/file_sync/conduit.rs:38 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of spacedriveapp/spacedrive@6dfeccf211 (2026-08-16).
Data as JSON: /api/errors/7901c26b84cdb480.
Report an issue: GitHub.