From a649fee20ae905ffd1de18c09153d7908a6209fc Mon Sep 17 00:00:00 2001 From: Sergey Pepyakin Date: Tue, 17 Jul 2018 22:52:42 +0200 Subject: [PATCH] Use create instead of open for export blocks (#356) --- polkadot/cli/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/polkadot/cli/src/lib.rs b/polkadot/cli/src/lib.rs index e4c6aa8a70..ea195bf840 100644 --- a/polkadot/cli/src/lib.rs +++ b/polkadot/cli/src/lib.rs @@ -360,7 +360,7 @@ fn export_blocks(matches: &clap::ArgMatches, exit: E) -> error::Result<()> let json = matches.is_present("json"); let mut file: Box = match matches.value_of("OUTPUT") { - Some(filename) => Box::new(File::open(filename)?), + Some(filename) => Box::new(File::create(filename)?), None => Box::new(stdout()), };