fn warn_about_missing_symlinks(&self) {
		// Create a hashset of all archived paths, and a list of all symlinks.
		let mut symlinks = Vec::new();
		let mut paths_archived = HashSet::new();

		for file in &self.files {
			if file.file.symlink.is_some() {
				// Calling canonicalize on the symlink will get us the target file/folder
				let target = match file.canonical_path.clone() {
					Some(target) => target,
					None => {
						warn!("The symlink '{}' was included in the backup, but the file/directory it links to doesn't exist.", file.file.path);
						continue;
					}
				};
				symlinks.push((file.file.path.clone(), target));
			} else {
				match file.canonical_path.clone() {
					Some(path) => {paths_archived.insert(path); ()},
					None => (),
				}
			}
		}

		// Now we can go through all symlinks and make sure the file/directory they link to exists.
		for (path, symlink) in symlinks {
			if paths_archived.contains(&symlink) {
				continue;
			}

			warn!("The symlink '{}' was included in the backup, but the file/directory it links to, '{}', was not included.", path, symlink.display());
		}
	}
/// Logs warnings about any symlinks for which we haven't backed up the file/directory linked.
Logs warnings about any symlinks for which we haven't backed up the file/directory linked.
Logs warnings about any symlinks for which we haven ' t backed up the file / directory linked .
fn warn_about_missing_symlinks(&self) {
		// Create a hashset of all archived paths, and a list of all symlinks.
		let mut symlinks = Vec::new();
		let mut paths_archived = HashSet::new();
		for file in &self.files {
			if file.file.symlink.is_some() {
				// Calling canonicalize on the symlink will get us the target file/folder
				let target = match file.canonical_path.clone() {
					Some(target) => target,
					None => {
						warn!("The symlink '{}' was included in the backup, but the file/directory it links to doesn't exist.", file.file.path);
						continue;
					}
				};
				symlinks.push((file.file.path.clone(), target));
			} else {
				match file.canonical_path.clone() {
					Some(path) => {paths_archived.insert(path); ()},
					None => (),
				}
			}
		}
		// Now we can go through all symlinks and make sure the file/directory they link to exists.
		for (path, symlink) in symlinks {
			if paths_archived.contains(&symlink) {
				continue;
			}
			warn!("The symlink '{}' was included in the backup, but the file/directory it links to, '{}', was not included.", path, symlink.display());
		}
	}
fn warn_about_missing_symlinks ( & self ) { // Create a hashset of all archived paths, and a list of all symlinks. let mut symlinks = Vec :: new ( ) ; let mut paths_archived = HashSet :: new ( ) ; for file in & self . files { if file . file . symlink . is_some ( ) { // Calling canonicalize on the symlink will get us the target file/folder let target = match file . canonical_path . clone ( ) { Some ( target ) => target , None => { warn ! ( " " file file path ) ; continue ; } } ; symlinks . push ( ( file . file . path . clone ( ) , target ) ) ; } else { match file . canonical_path . clone ( ) { Some ( path ) => { paths_archived . insert ( path ) ; ( ) } , None => ( ) , } } } // Now we can go through all symlinks and make sure the file/directory they link to exists. for ( path , symlink ) in symlinks { if paths_archived . contains ( & symlink ) { continue ; } warn ! ( " " path symlink display ( ) ) ; } }
Logs warnings about any symlinks for which we haven't backed up the file/directory linked.
Logs warnings about any symlinks for which we haven ' t backed up the file / directory linked .
&self
&self