{"record":{"id":"6138c61c490dc6ad","repo":"spacedriveapp/spacedrive","slug":"no-cloud-volumes-with-mount-points-found-cloud-vo","errorCode":null,"errorMessage":"No cloud volumes with mount points found. Cloud volumes must have mount points.","messagePattern":"No cloud volumes with mount points found\\. Cloud volumes must have mount points\\.","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"apps/cli/src/domains/location/mod.rs","lineNumber":194,"sourceCode":"\t\t\t);\n\t\t}\n\n\t\t// Present volume choices (showing service-based URIs)\n\t\tlet volume_choices: Vec<String> = volumes\n\t\t\t.volumes\n\t\t\t.iter()\n\t\t\t.map(|v| {\n\t\t\t\tformat!(\n\t\t\t\t\t\"{} ({}) - {}\",\n\t\t\t\t\tv.name,\n\t\t\t\t\tv.mount_point.display(), // Show mount point like \"s3://bucket\"\n\t\t\t\t\tv.volume_type\n\t\t\t\t)\n\t\t\t})\n\t\t\t.collect();\n\n\t\tif volume_choices.is_empty() {\n\t\t\tanyhow::bail!(\n\t\t\t\t\"No cloud volumes with mount points found. Cloud volumes must have mount points.\"\n\t\t\t);\n\t\t}\n\n\t\tlet volume_idx = select(\"Select cloud volume\", &volume_choices)?;\n\n\t\t// Get the mount point for the selected volume\n\t\tlet selected_volume = &volumes.volumes[volume_idx];\n\t\tlet mount_point = &selected_volume.mount_point;\n\n\t\t// Get cloud path within the volume\n\t\tlet cloud_path = text(\n\t\t\t\"Enter path within volume (e.g., / for root or /photos)\",\n\t\t\tfalse,\n\t\t)?\n\t\t.unwrap();\n\n\t\t// Construct service-based URI: mount_point + path","sourceCodeStart":176,"sourceCodeEnd":212,"githubUrl":"https://github.com/spacedriveapp/spacedrive/blob/6dfeccf2113039e35f2ce735f945e70dc3e4ea45/apps/cli/src/domains/location/mod.rs#L176-L212","documentation":"Defensive guard after building the cloud-volume choice list in the interactive location-add flow. In the current code every tracked volume is unconditionally formatted into volume_choices (there is no filter), so given the earlier empty-volumes bail at line 173 this branch is effectively unreachable; it exists to catch volumes that lack a usable mount_point, which the SdPath URI construction below depends on.","triggerScenarios":"Only if tracked volumes exist but produce zero selectable choices - with the current map() that cannot happen; historically this guarded volumes whose mount_point was empty or local-style rather than a service URI like s3://bucket.","commonSituations":"A volume registered with a missing/blank mount point after a partial 'sd volume add-cloud'; schema or version drift changing what mount_point contains.","solutions":["Re-run 'sd volume add-cloud' for the affected volume so it gets a proper service-style mount point","Inspect the volume list output to see which volume has an empty or unexpected mount point","If you maintain this code, filter volumes without scheme-based mount points explicitly so the guard is reachable and accurate"],"exampleFix":"// before: guard is unreachable because map() never filters\nlet volume_choices: Vec<String> = volumes.volumes.iter().map(|v| format!(...)).collect();\n\n// after: make the intent real by filtering mount-point-less volumes\nlet volume_choices: Vec<String> = volumes\n    .volumes\n    .iter()\n    .filter(|v| v.mount_point.to_string_lossy().contains(\"://\"))\n    .map(|v| format!(\"{} ({}) - {}\", v.name, v.mount_point.display(), v.volume_type))\n    .collect();","handlingStrategy":"validation","validationCode":"let usable: Vec<_> = volumes\n    .volumes\n    .iter()\n    .filter(|v| v.mount_point.to_string_lossy().contains(\"://\"))\n    .collect();\nif usable.is_empty() {\n    eprintln!(\"No cloud volumes with a service-style mount point; re-add with 'sd volume add-cloud'\");\n    return Ok(());\n}","typeGuard":"fn volume_has_service_mount(v: &VolumeInfo) -> bool {\n    v.mount_point.to_string_lossy().contains(\"://\")\n}","tryCatchPattern":null,"preventionTips":["Register cloud volumes through 'sd volume add-cloud' so mount points follow the service-URI form","Treat an empty/odd mount point in the volume list as a red flag before location add","If maintaining this code, make the mount-point filter explicit so this guard is reachable"],"tags":["cli","location","volumes","dead-code","cloud"],"backgroundTag":null,"analyzedSha":"6dfeccf2113039e35f2ce735f945e70dc3e4ea45","analyzedAt":"2026-08-16T11:26:17.074Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}