spacedriveapp/spacedrive · error · anyhow::Error
Non-local path not supported yet
Error message
Non-local path not supported yet
What it means
`sd-cli index quick-scan <path>` parses its single positional argument through `SdPath::from_uri` and requires `as_local_path()` to return Some, because quick-scan runs a shallow ephemeral index over a local directory. Any URI form that resolves to a non-local variant (content id, remote device) fails here with this generic message (unlike index start, the offending path is not echoed).
Source
Thrown at apps/cli/src/domains/index/args.rs:111
.with_scope(IndexScope::from(self.scope.clone()))
.with_include_hidden(self.include_hidden)
.with_persistence(persistence))
}
}
#[derive(Args, Debug, Clone)]
pub struct QuickScanArgs {
pub path: String,
#[arg(long, value_enum, default_value = "current")]
pub scope: IndexScopeArg,
}
impl QuickScanArgs {
pub fn to_input(&self, library_id: Uuid) -> anyhow::Result<IndexInput> {
let sd = SdPath::from_uri(&self.path).unwrap_or_else(|_| SdPath::local(&self.path));
let p = sd
.as_local_path()
.ok_or_else(|| anyhow::anyhow!("Non-local path not supported yet"))?;
Ok(IndexInput::new(library_id, vec![p.to_path_buf()])
.with_mode(IndexMode::Shallow)
.with_scope(IndexScope::from(self.scope.clone()))
.with_persistence(IndexPersistence::Ephemeral))
}
}
#[derive(Args, Debug, Clone)]
pub struct BrowseArgs {
pub path: String,
#[arg(long, value_enum, default_value = "current")]
pub scope: IndexScopeArg,
#[arg(long, default_value_t = false)]
pub content: bool,
}
impl BrowseArgs {
pub fn to_input(&self, library_id: Uuid) -> anyhow::Result<IndexInput> {View on GitHub (pinned to 6dfeccf211)
Solutions
- Give a real directory path: `sd-cli index quick-scan ~/Documents`.
- Verify your argument has no `scheme://` prefix before invoking.
- If you need to index a remote location, that capability is not implemented yet — use the local mount point instead.
Example fix
# before sd-cli index quick-scan p2p://peer/media # -> Non-local path not supported yet # after sd-cli index quick-scan /mnt/remote-media
Defensive patterns
Strategy: type-guard
Validate before calling
fn quick_scan_target_ok(s: &str) -> bool {
sd_core::domain::SdPath::from_uri(s)
.map(|p| p.as_local_path().is_some())
.unwrap_or(false)
}
if !quick_scan_target_ok(&args.path) { anyhow::bail!("quick-scan needs a local directory path"); } Type guard
pub fn is_local_indexable(s: &str) -> bool {
matches!(SdPath::from_uri(s), Ok(sd) if sd.as_local_path().is_some())
} Try / catch
match QuickScanArgs::to_input(&args, library_id) {
Err(e) if e.to_string() == "Non-local path not supported yet" => { eprintln!("use a local mount point for quick-scan"); Err(e) }
other => other,
} Prevention
- Quick-scan takes exactly one local directory; strip any scheme:// prefix before passing it.
- For remote content, mount it locally first and point quick-scan at the mount.
- Guard inputs in scripts so URI-shaped values never reach this command.
When it happens
Trigger: Running `sd-cli index quick-scan content://<uuid>` or a remote-scheme URI; passing a local:// URI whose device slug does not match this machine.
Common situations: Reusing a path string copied from Spacedrive's UI or a synced library export that is URI-formatted rather than a filesystem path.
Related errors
- Non-local address not supported for indexing yet: {}
- Invalid sort option: {}. Valid options are: name, modified,
- Failed to build action: {}
- Operation aborted by user
- Invalid choice selected
AI-assisted analysis of spacedriveapp/spacedrive@6dfeccf211 (2026-08-16).
Data as JSON: /api/errors/e28471b4789d7a76.
Report an issue: GitHub.