LOJL4HMYG7EOVZ5MSMCORDLDSRHWO2JPHMOTLMLQA7GPJNSVDXOQC
Z7J55B4PRHEXBE7GCCSF66GEM4NGFFOWEZALZ7THH6AG2ZJHIN5AC
HSEYMLO2DJCDGBO4F7T6NFMFSZ4TMSOBH5XGIU5NYOEFKUSV5UKAC
SXEYMYF7P4RZMZ46WPL4IZUTSQ2ATBWYZX7QNVMS3SGOYXYOHAGQC
A3DMBJJAPLS6ASSZ7JVVVULRQNZCF2WKYTRUD7EY7PKVYABSATFAC
G7VOM2IMN4SOHOOCFLMNPKTU5DB5EEJMK7SSBA3DLWWXFA672RUAC
ZHABNS3S6FSINO74FOI5KHYXYDTBPO4FQTTYTUS7NNKEVVNLYC4AC
let prefix_ = CanonicalPathBuf::canonicalize(&repo.as_path().join(&prefix))?;
let repo_prefix = &repo.join(&prefix);
let prefix_ = if let Ok(x) = repo_prefix.canonicalize() {
x
} else {
let mut p = PathBuf::new();
for c in repo_prefix.components() {
use std::path::Component;
match c {
Component::Prefix(_) => p.push(c.as_os_str()),
Component::RootDir => p.push(c.as_os_str()),
Component::CurDir => {},
Component::ParentDir => { p.pop(); },
Component::Normal(x) => p.push(x),
}
}
p
};
{
let path = if let Ok(path) = full.as_path().strip_prefix(&repo_path.as_path()) {
path
} else {
return Ok(());
};
use path_slash::PathExt;
let path_str = path.to_slash_lossy();
if !txn.read().is_tracked(&path_str)? {
self.add_prefix_rec(&txn, repo_path, full, threads, salt)?;
if let Ok(full) = CanonicalPathBuf::canonicalize(&full) {
if let Ok(path) = full.as_path().strip_prefix(&repo_path.as_path()) {
use path_slash::PathExt;
let path_str = path.to_slash_lossy();
if !txn.read().is_tracked(&path_str)? {
self.add_prefix_rec(&txn, repo_path, full, threads, salt)?;
}