Fixed tarfile import

This commit is contained in:
Dennis Schwerdel 2017-06-20 12:07:42 +02:00
parent e3ed5f628d
commit 8d45176146
2 changed files with 3 additions and 2 deletions

View File

@ -9,6 +9,7 @@ This project follows [semantic versioning](http://semver.org).
* [modified] Also documenting common flags in subcommands
* [modified] Using repository aliases (**conversion needed**)
* [modified] Remote path must be absolute
* [fixed] Fixed tarfile import
### v0.3.2 (2017-05-11)

View File

@ -251,9 +251,9 @@ impl Repository {
let mut failed_paths = vec![];
let tarfile = tarfile.as_ref();
let (root_inode, chunks) = if tarfile == Path::new("-") {
try!(self.import_tarfile_as_inode(&mut backup, try!(File::open(tarfile)), &mut failed_paths))
} else {
try!(self.import_tarfile_as_inode(&mut backup, io::stdin(), &mut failed_paths))
} else {
try!(self.import_tarfile_as_inode(&mut backup, try!(File::open(tarfile)), &mut failed_paths))
};
backup.root = chunks;
try!(self.flush());