Skip to content

Commit

Permalink
fix(core): fix test path
Browse files Browse the repository at this point in the history
  • Loading branch information
SARDONYX-sard committed Nov 2, 2023
1 parent a097f44 commit 844d8d7
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions dar2oar_core/src/fs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ pub async fn remove_oar(search_dir: impl AsRef<Path>) -> Result<()> {
if path.is_dir() {
let path = path.to_str();
if let Some(path) = path {
if path.ends_with("OpenAnimationReplacer/") {
if path.ends_with("OpenAnimationReplacer") {
trace!("Try to remove oar dir: {:?}", &path);
fs::remove_dir_all(path).await?;
removed_once = true;
Expand All @@ -177,8 +177,13 @@ pub async fn remove_oar(search_dir: impl AsRef<Path>) -> Result<()> {
}
}

if removed_once {
return Err(ConvertError::NotFoundOarDir);
match removed_once {
true => Ok(()),
false => Err(ConvertError::NotFoundOarDir),
}
Ok(())
}

#[tokio::test]
async fn remove_oar_dir() -> Result<()> {
remove_oar("../test/data/UNDERDOG Animations").await
}

0 comments on commit 844d8d7

Please sign in to comment.