INNER CODE UNIT · Rust
rejects_destinations_below_files_and_symlinks
XayahSuSuSu/Android-DataBackup · source-next/native/src/main/jni/rustic/src/mapped_source.rs:395
fn rejects_destinations_below_files_and_symlinks() {
let workspace = Workspace::new();
workspace.write("parent/file", "old");
workspace.write("other/payload", "new");
#[cfg(unix)]
{
use std::os::unix::fs::symlink;
symlink(workspace.0.join("other"), workspace.0.join("parent/link")).unwrap();
symlink(
workspace.0.join("missing"),
workspace.0.join("parent/dangling"),
)
.unwrap();
}
let mut ancestors = vec!["file"];
#[cfg(unix)]
ancestors.extend(["link", "dangling"]);
for ancestor in ancestors {