mirror of
https://github.com/encounter/rust-ffmpeg-zmwangx.git
synced 2026-07-10 21:18:40 -07:00
Don't fail clone if there's already a directory
This commit is contained in:
committed by
Till Höppner
parent
2b7bb7cf1a
commit
1bfc5cebcc
+5
-2
@@ -117,13 +117,16 @@ fn search() -> PathBuf {
|
||||
}
|
||||
|
||||
fn fetch() -> io::Result<()> {
|
||||
let output_base_path = output();
|
||||
let clone_dest_dir = format!("ffmpeg-{}", version());
|
||||
let _ = std::fs::remove_dir_all(output_base_path.join(&clone_dest_dir));
|
||||
let status = Command::new("git")
|
||||
.current_dir(&output())
|
||||
.current_dir(&output_base_path)
|
||||
.arg("clone")
|
||||
.arg("-b")
|
||||
.arg(format!("release/{}", version()))
|
||||
.arg("https://github.com/FFmpeg/FFmpeg")
|
||||
.arg(format!("ffmpeg-{}", version()))
|
||||
.arg(&clone_dest_dir)
|
||||
.status()?;
|
||||
|
||||
if status.success() {
|
||||
|
||||
Reference in New Issue
Block a user