Add some debug output
This commit is contained in:
parent
ecc8cc4567
commit
24210c0068
2 changed files with 5 additions and 0 deletions
|
@ -130,6 +130,7 @@ impl FileAbstraction for FSFileAbstraction {
|
|||
}
|
||||
|
||||
fn create_dir_all(&self, path: &PathBuf) -> Result<(), SE> {
|
||||
debug!("Creating: {:?}", path);
|
||||
create_dir_all(path).chain_err(|| SEK::DirNotCreated)
|
||||
}
|
||||
|
||||
|
|
|
@ -766,6 +766,7 @@ impl Store {
|
|||
if hsmap.contains_key(&new_id) {
|
||||
return Err(SE::from_kind(SEK::EntryAlreadyExists(new_id.clone())));
|
||||
}
|
||||
debug!("New id does not exist in cache");
|
||||
|
||||
// if we do not have an entry here, we fail in `FileAbstraction::rename()` below.
|
||||
// if we have one, but it is borrowed, we really should not rename it, as this might
|
||||
|
@ -774,12 +775,15 @@ impl Store {
|
|||
return Err(SE::from_kind(SEK::EntryAlreadyBorrowed(old_id.clone())));
|
||||
}
|
||||
|
||||
debug!("Old id is not yet borrowed");
|
||||
|
||||
let old_id_pb = try!(old_id.clone().with_base(self.path().clone()).into_pathbuf());
|
||||
let new_id_pb = try!(new_id.clone().with_base(self.path().clone()).into_pathbuf());
|
||||
|
||||
if try!(self.backend.exists(&new_id_pb)) {
|
||||
return Err(SE::from_kind(SEK::EntryAlreadyExists(new_id.clone())));
|
||||
}
|
||||
debug!("New entry does not yet exist on filesystem. Good.");
|
||||
|
||||
match self.backend.rename(&old_id_pb, &new_id_pb) {
|
||||
Err(e) => return Err(e).chain_err(|| SEK::EntryRenameError(old_id_pb, new_id_pb)),
|
||||
|
|
Loading…
Reference in a new issue