mirror of
https://github.com/YGGverse/btracker.git
synced 2026-03-31 09:05:30 +00:00
use into
This commit is contained in:
parent
157f13c984
commit
659ca5edfc
1 changed files with 2 additions and 2 deletions
|
|
@ -25,12 +25,12 @@ impl Preload {
|
|||
}
|
||||
|
||||
pub fn clear_output_folder(&self, info_hash: &str) -> Result<()> {
|
||||
Ok(fs::remove_dir_all(&self.path(&PathBuf::from(info_hash))?)?)
|
||||
Ok(fs::remove_dir_all(&self.path(&info_hash.into())?)?)
|
||||
}
|
||||
|
||||
/// * create new directory if not exists
|
||||
pub fn output_folder(&self, info_hash: &str) -> Result<PathBuf> {
|
||||
let p = self.path(&PathBuf::from(info_hash))?;
|
||||
let p = self.path(&info_hash.into())?;
|
||||
if !p.exists() {
|
||||
fs::create_dir(&p)?
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue