{"record":{"id":"e28471b4789d7a76","repo":"spacedriveapp/spacedrive","slug":"non-local-path-not-supported-yet","errorCode":null,"errorMessage":"Non-local path not supported yet","messagePattern":"Non-local path not supported yet","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"apps/cli/src/domains/index/args.rs","lineNumber":111,"sourceCode":"\t\t\t.with_scope(IndexScope::from(self.scope.clone()))\n\t\t\t.with_include_hidden(self.include_hidden)\n\t\t\t.with_persistence(persistence))\n\t}\n}\n\n#[derive(Args, Debug, Clone)]\npub struct QuickScanArgs {\n\tpub path: String,\n\t#[arg(long, value_enum, default_value = \"current\")]\n\tpub scope: IndexScopeArg,\n}\n\nimpl QuickScanArgs {\n\tpub fn to_input(&self, library_id: Uuid) -> anyhow::Result<IndexInput> {\n\t\tlet sd = SdPath::from_uri(&self.path).unwrap_or_else(|_| SdPath::local(&self.path));\n\t\tlet p = sd\n\t\t\t.as_local_path()\n\t\t\t.ok_or_else(|| anyhow::anyhow!(\"Non-local path not supported yet\"))?;\n\t\tOk(IndexInput::new(library_id, vec![p.to_path_buf()])\n\t\t\t.with_mode(IndexMode::Shallow)\n\t\t\t.with_scope(IndexScope::from(self.scope.clone()))\n\t\t\t.with_persistence(IndexPersistence::Ephemeral))\n\t}\n}\n\n#[derive(Args, Debug, Clone)]\npub struct BrowseArgs {\n\tpub path: String,\n\t#[arg(long, value_enum, default_value = \"current\")]\n\tpub scope: IndexScopeArg,\n\t#[arg(long, default_value_t = false)]\n\tpub content: bool,\n}\n\nimpl BrowseArgs {\n\tpub fn to_input(&self, library_id: Uuid) -> anyhow::Result<IndexInput> {","sourceCodeStart":93,"sourceCodeEnd":129,"githubUrl":"https://github.com/spacedriveapp/spacedrive/blob/6dfeccf2113039e35f2ce735f945e70dc3e4ea45/apps/cli/src/domains/index/args.rs#L93-L129","documentation":"`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).","triggerScenarios":"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.","commonSituations":"Reusing a path string copied from Spacedrive's UI or a synced library export that is URI-formatted rather than a filesystem path.","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."],"exampleFix":"# before\nsd-cli index quick-scan p2p://peer/media  # -> Non-local path not supported yet\n\n# after\nsd-cli index quick-scan /mnt/remote-media","handlingStrategy":"type-guard","validationCode":"fn quick_scan_target_ok(s: &str) -> bool {\n    sd_core::domain::SdPath::from_uri(s)\n        .map(|p| p.as_local_path().is_some())\n        .unwrap_or(false)\n}\nif !quick_scan_target_ok(&args.path) { anyhow::bail!(\"quick-scan needs a local directory path\"); }","typeGuard":"pub fn is_local_indexable(s: &str) -> bool {\n    matches!(SdPath::from_uri(s), Ok(sd) if sd.as_local_path().is_some())\n}","tryCatchPattern":"match QuickScanArgs::to_input(&args, library_id) {\n    Err(e) if e.to_string() == \"Non-local path not supported yet\" => { eprintln!(\"use a local mount point for quick-scan\"); Err(e) }\n    other => other,\n}","preventionTips":["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."],"tags":["cli","indexing","quick-scan","sdpath","uri"],"backgroundTag":null,"analyzedSha":"6dfeccf2113039e35f2ce735f945e70dc3e4ea45","analyzedAt":"2026-08-16T11:26:17.074Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}