Skip to content

Commit

Permalink
delete directory before copy
Browse files Browse the repository at this point in the history
  • Loading branch information
aumetra committed Dec 9, 2023
1 parent 45eb307 commit c772a16
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions kitsune/build.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use camino::Utf8PathBuf;
use camino::Utf8Path;
use fs_extra::dir::{self, CopyOptions};
use std::{env, error::Error, io, process::Command};

Expand All @@ -22,8 +22,10 @@ fn main() -> Result<(), Box<dyn Error>> {
println!("cargo:rerun-if-changed=assets");
println!("cargo:rerun-if-changed=templates");

let assets_path = Utf8PathBuf::from("./assets").canonicalize_utf8()?;
let prepared_assets_path = Utf8PathBuf::from("./assets-dist").canonicalize_utf8()?;
let assets_path = Utf8Path::new("./assets").canonicalize_utf8()?;
let prepared_assets_path = Utf8Path::new("./assets-dist").canonicalize_utf8()?;

dir::remove(&prepared_assets_path)?;

let copy_options = CopyOptions {
overwrite: true,
Expand Down

0 comments on commit c772a16

Please sign in to comment.