From 1d32e421927346d973487c01208ec955f8c68334 Mon Sep 17 00:00:00 2001 From: JSDurand Date: Thu, 13 Jul 2023 16:47:09 +0800 Subject: genins: stop printing files if the directory does not exist --- chain/src/item/genins.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'chain') diff --git a/chain/src/item/genins.rs b/chain/src/item/genins.rs index e409c3c..ce34df9 100644 --- a/chain/src/item/genins.rs +++ b/chain/src/item/genins.rs @@ -211,7 +211,11 @@ impl DefaultForest> { // Whether or not to print detailed graphs of each step of // operation for debugging purposes. - let to_print = true; + let mut to_print = true; + + if std::fs::metadata(format!("output/")).is_err() { + to_print = false; + } let tnt_string = { let empty_p = atom_child_iter.len() == 0; -- cgit v1.2.3-18-g5258