mirror of https://github.com/dswd/zvault
Fixed inode retrieval for single-file backups
This commit is contained in:
parent
be1b8bac60
commit
f7899bb9f3
|
@ -22,6 +22,7 @@ This project follows [semantic versioning](http://semver.org).
|
|||
- [fixed] Ignoring missing backups folder
|
||||
- [fixed] Fixed problems with uploads from relative repository paths
|
||||
- [fixed] Fixed finished messages
|
||||
- [fixed] Fixed inode retrieval for single-file backups
|
||||
|
||||
|
||||
### v0.1.0 (2017-04-11)
|
||||
|
|
|
@ -325,6 +325,9 @@ impl Repository {
|
|||
for c in path.as_ref().components() {
|
||||
if let path::Component::Normal(name) = c {
|
||||
let name = name.to_string_lossy();
|
||||
if inodes.is_empty() && inode.file_type != FileType::Directory && inode.name == name {
|
||||
return Ok(vec![inode]);
|
||||
}
|
||||
if let Some(chunks) = inode.children.as_mut().and_then(|c| c.remove(&name as &str)) {
|
||||
inodes.push(inode);
|
||||
inode = try!(self.get_inode(&chunks));
|
||||
|
|
Loading…
Reference in New Issue