spacedriveapp/spacedrive · error

Invalid sync mode

Error message

Invalid sync mode

What it means

Error "Invalid sync mode" thrown in spacedriveapp/spacedrive.

Source

Thrown at core/src/service/file_sync/resolver.rs:100

		let target_root = entry::Entity::find_by_id(conduit.target_entry_id)
			.one(&*self.db)
			.await?
			.ok_or_else(|| anyhow::anyhow!("Target entry not found"))?;

		// Load all entries under each root
		let source_entries = self
			.get_entries_recursive(conduit.source_entry_id, &source_root)
			.await?;
		let target_entries = self
			.get_entries_recursive(conduit.target_entry_id, &target_root)
			.await?;

		// Build path maps
		let source_map = self.build_path_map(&source_entries);
		let target_map = self.build_path_map(&target_entries);

		let mode = sync_conduit::SyncMode::from_str(&conduit.sync_mode)
			.ok_or_else(|| anyhow::anyhow!("Invalid sync mode"))?;

		match mode {
			sync_conduit::SyncMode::Mirror => Ok(self.resolve_mirror(&source_map, &target_map)),
			sync_conduit::SyncMode::Bidirectional => {
				self.resolve_bidirectional(&source_map, &target_map, conduit)
					.await
			}
			sync_conduit::SyncMode::Selective => Ok(self.resolve_mirror(&source_map, &target_map)),
		}
	}

	/// Get all entries under a directory recursively
	/// This is a simplified implementation - in a real implementation,
	/// we'd need to reconstruct full paths by walking parent relationships
	async fn get_entries_recursive(
		&self,
		root_id: i32,
		root_entry: &entry::Model,

View on GitHub (pinned to 6dfeccf211)

When it happens

Trigger: Thrown at core/src/service/file_sync/resolver.rs:100 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/320e4bd1c0ec21ab. Report an issue: GitHub.