From c90d0ab34a2c3474ee589b5b286ad4806ed2fb87 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Wed, 8 Nov 2017 17:21:57 +0100 Subject: [PATCH] Fix UUID-Filename creating, add debug output --- bin/domain/imag-contact/src/create.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/domain/imag-contact/src/create.rs b/bin/domain/imag-contact/src/create.rs index dcb5f33f..7ef728a4 100644 --- a/bin/domain/imag-contact/src/create.rs +++ b/bin/domain/imag-contact/src/create.rs @@ -78,9 +78,12 @@ pub fn create(rt: &Runtime) { error!("File does exist, cannot create/override"); exit(1); } else if fl.is_dir() { - fl.set_file_name(Uuid::new_v4().hyphenated().to_string()); + fl.push(Uuid::new_v4().hyphenated().to_string()); + info!("Creating file: {:?}", fl); } + debug!("Destination = {:?}", fl); + let file = OpenOptions::new() .write(true) .create_new(true)