When using Asset::copy("legit-src", "non-existant-destination") or asset.write("non-existant-destination"), the call will raise an error if the destination path does not exist for a LocalAsset.
Potential solution would be to check if the destination Path is a valid directory and create it (plus any parent directories) if not using something like fs::create_dir_all before the complete destination path (including filename) is built.
e.g.
let dest_path = Path::new(dest_dir);
if !dest_path.is_dir() {
std::fs::create_dir_all(dest_path)?;
}
If this is intended behaviour then feel free to ignore this!