Closed AlexAxthelm closed 6 months ago
From: https://github.com/RMI-PACTA/workflow.data.preparation/issues/182#issuecomment-1972878210
I could add on
on.exit()
hook to remove the directory if it doesn't contain any files (or on any condition), which should run even if there's an error.
I think that delaying creation is a better solution than creating and then removing (robust against system crashes)
Where do the pre-flight files get saved if config[["preflight_data_path"]] == ""
?
Where do the pre-flight files get saved if
config[["preflight_data_path"]] == ""
?
Hmm. fair point. That would error out. I don't see a good way to resolve that, so I think we can live with the extra directories being created.
Move directory creation to just prior to writing the first file to output directory, so that it is not created unnecessarily.
Closes: #182