Fix erroneous change to bury

This commit is contained in:
Kevin Liu 2016-11-04 10:38:30 -07:00
parent 98f5008728
commit 208ca3db68

View file

@ -271,7 +271,8 @@ fn bury<S: AsRef<Path>, D: AsRef<Path>>(source: S, dest: D) -> io::Result<()> {
// Walk the source, creating directories and copying files as needed
for entry in WalkDir::new(source).into_iter().filter_map(|e| e.ok()) {
// Path without the top-level directory
let orphan: &Path = &join_absolute(entry.path(), source);
let orphan: &Path = entry.path().strip_prefix(source)
.map_err(|err| io::Error::new(io::ErrorKind::Other, err))?;
if entry.file_type().is_dir() {
let mode = entry.metadata()?.permissions().mode();
if let Err(e) = fs::DirBuilder::new()