From 3bbab053bb6e96da194b32c582de8683c20ff34e Mon Sep 17 00:00:00 2001 From: alexanderbates Date: Tue, 2 Jan 2024 14:14:53 -0500 Subject: [PATCH] Update utilities.R --- R/utilities.R | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/R/utilities.R b/R/utilities.R index e12ccda..9573e2a 100644 --- a/R/utilities.R +++ b/R/utilities.R @@ -649,6 +649,9 @@ update.neuronlistfh <- function(x = NULL, if(dbClass == "HDF5"){ given.neurons = nat.hdf5::write.neurons.hdf5(x, file = data, ...) }else if(dbClass == "ZIP"){ + if(!length(x)){ + next + } temp.zip = file.path(dirname(file),"temp_neuronlist_archive.zip") if(file.exists(file)){ file.copy(from = file, to = temp.zip, overwrite = TRUE) @@ -697,6 +700,7 @@ update.neuronlistfh <- function(x = NULL, } nat::write.neurons(x, dir=swc, format='swc', Force = FALSE, metadata=TRUE) } + invisible() } # hidden