Compare commits

..

No commits in common. "1a4d2029894cd37d76eb2189c3ed5a469052976a" and "ab6e7441f19fa5d7c92f7c4f97d0f495aa09169e" have entirely different histories.

2 changed files with 2 additions and 11 deletions

View File

@ -40,7 +40,6 @@ impl Creator {
.into_iter() .into_iter()
.filter(Result::is_ok) .filter(Result::is_ok)
.map(|x| x.unwrap().path().to_path_buf()) .map(|x| x.unwrap().path().to_path_buf())
.filter(|x| !x.is_dir())
.collect::<Vec<_>>(); .collect::<Vec<_>>();
env::set_current_dir(d)?; env::set_current_dir(d)?;
Ok(Self { Ok(Self {
@ -50,15 +49,10 @@ impl Creator {
}) })
} }
pub fn from_list(list: &[&str], path: Option<&Path>, specs: Specs) -> Result<Self, io::Error> { pub fn from_list(list: &[&str], specs: Specs) -> Result<Self, io::Error> {
let entries = list.iter().map(|x| Path::new(x).to_path_buf()).collect(); let entries = list.iter().map(|x| Path::new(x).to_path_buf()).collect();
let path = if let Some(p) = path {
p.to_path_buf()
} else {
env::current_dir().unwrap_or(Path::new("/").to_path_buf())
};
Ok(Self { Ok(Self {
path, path: env::current_dir().unwrap_or(Path::new("/").to_path_buf()),
entries, entries,
specs, specs,
}) })

View File

@ -35,12 +35,10 @@ impl<T: io::Read> Installer<T> {
mod error { mod error {
use std::{io, fmt, error::Error}; use std::{io, fmt, error::Error};
use hpk_package::tar;
#[derive(Debug)] #[derive(Debug)]
pub enum InstallError { pub enum InstallError {
IO(io::Error), IO(io::Error),
Tar(tar::Error),
} }
impl fmt::Display for InstallError { impl fmt::Display for InstallError {
@ -53,7 +51,6 @@ mod error {
fn source(&self) -> Option<&(dyn Error + 'static)> { fn source(&self) -> Option<&(dyn Error + 'static)> {
match self { match self {
Self::IO(e) => Some(e), Self::IO(e) => Some(e),
Self::Tar(e) => Some(e),
} }
} }
} }