ciruela 0.6.12

A peer-to-peer synchronization software for servers in datacenters.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std::path::{Path, PathBuf};

use openat::Dir;


pub fn recover_path<P: AsRef<Path>>(dir: &Dir, path: P) -> PathBuf {
    let mut result = dir.recover_path()
        .unwrap_or_else(|e| {
            warn!("Error recovering path {:?}: {}", dir, e);
            PathBuf::from("<unknown>")
        });
    result.push(path.as_ref());
    result
}