mirror of
https://github.com/crunchy-labs/crunchy-cli.git
synced 2026-01-21 12:12:00 -06:00
Add archive start sync flag
This commit is contained in:
parent
fe49161e93
commit
1a511e12f9
8 changed files with 692 additions and 179 deletions
|
|
@ -184,16 +184,29 @@ pub async fn main(args: &[String]) {
|
|||
.unwrap_or_default()
|
||||
.starts_with(".crunchy-cli_")
|
||||
{
|
||||
let result = fs::remove_file(file.path());
|
||||
debug!(
|
||||
"Ctrl-c removed temporary file {} {}",
|
||||
file.path().to_string_lossy(),
|
||||
if result.is_ok() {
|
||||
"successfully"
|
||||
} else {
|
||||
"not successfully"
|
||||
}
|
||||
)
|
||||
if file.file_type().map_or(true, |ft| ft.is_file()) {
|
||||
let result = fs::remove_file(file.path());
|
||||
debug!(
|
||||
"Ctrl-c removed temporary file {} {}",
|
||||
file.path().to_string_lossy(),
|
||||
if result.is_ok() {
|
||||
"successfully"
|
||||
} else {
|
||||
"not successfully"
|
||||
}
|
||||
)
|
||||
} else {
|
||||
let result = fs::remove_dir_all(file.path());
|
||||
debug!(
|
||||
"Ctrl-c removed temporary directory {} {}",
|
||||
file.path().to_string_lossy(),
|
||||
if result.is_ok() {
|
||||
"successfully"
|
||||
} else {
|
||||
"not successfully"
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue