Use create instead of open for export blocks (#356)

This commit is contained in:
Sergey Pepyakin
2018-07-17 22:52:42 +02:00
committed by Arkadiy Paronyan
parent 94fcb9a262
commit 7dcbf77c9d
+1 -1
View File
@@ -360,7 +360,7 @@ fn export_blocks<E>(matches: &clap::ArgMatches, exit: E) -> error::Result<()>
let json = matches.is_present("json");
let mut file: Box<Write> = match matches.value_of("OUTPUT") {
Some(filename) => Box::new(File::open(filename)?),
Some(filename) => Box::new(File::create(filename)?),
None => Box::new(stdout()),
};