Skip to main content

validate_data_dir

Function validate_data_dir 

Source
pub fn validate_data_dir(path: &Path) -> Result<()>
Expand description

Validate that path (a candidate Solo data dir) is safe.

Checks:

  1. No ancestor path component is a known cloud-sync folder.
  2. Path is absolute (otherwise the cloud-sync check is unreliable — a relative path could resolve into a cloud folder depending on cwd).

Returns Ok(()) on success, Err(Error::InvalidInput) with a clear message on failure. Existence of the path is NOT required — solo init creates it.