mirror of
https://github.com/asciinema/asciinema.git
synced 2025-12-16 03:38:03 +01:00
Fix recording to a pipe
This commit is contained in:
@@ -120,16 +120,16 @@ impl Cli {
|
||||
let path = Path::new(&self.filename);
|
||||
|
||||
if path.exists() {
|
||||
if !append && !overwrite {
|
||||
bail!("file exists, use --overwrite or --append");
|
||||
}
|
||||
|
||||
let metadata = fs::metadata(path)?;
|
||||
|
||||
if metadata.len() == 0 {
|
||||
overwrite = true;
|
||||
append = false;
|
||||
}
|
||||
|
||||
if !append && !overwrite {
|
||||
bail!("file exists, use --overwrite or --append");
|
||||
}
|
||||
} else {
|
||||
append = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user