From 0e53e2d6efcc057d6f239ae2948fa095d1d7d8b0 Mon Sep 17 00:00:00 2001 From: Stefan Lang Date: Mon, 9 Dec 2024 10:46:53 +0100 Subject: [PATCH] Hopefully working this time. --- src/singlecelldata/singlecelldata.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/singlecelldata/singlecelldata.rs b/src/singlecelldata/singlecelldata.rs index 2dec30e..40be9d4 100644 --- a/src/singlecelldata/singlecelldata.rs +++ b/src/singlecelldata/singlecelldata.rs @@ -284,7 +284,7 @@ impl SingleCellData{ } if ! rs { - match fs::create_dir ( file_path.clone() ){ + match fs::create_dir_all ( file_path.clone() ){ Ok(_file) => (), Err(err) => { eprintln!("Error?: {err:#?}"); @@ -294,7 +294,7 @@ impl SingleCellData{ if fs::remove_file(file_path.join("matrix.mtx.gz") ).is_ok(){}; - let file = match fs::create_dir_all( file_path.join("matrix.mtx.gz") ){ + let file = match File::create( file_path.join("matrix.mtx.gz") ){ Ok(file) => file, Err(err) => { panic!("Error creating the path?: {err:#?}"); @@ -310,7 +310,7 @@ impl SingleCellData{ //} if fs::remove_file(file_path.join("barcodes.tsv.gz") ).is_ok(){}; - let file_b = match fs::create_dir_all( file_path.join("barcodes.tsv.gz") ){ + let file_b = match File::create( file_path.join("barcodes.tsv.gz") ){ Ok(file) => file, Err(err) => { panic!("Error creating the path?: {err:#?}");