Skip to content

Commit f113e56

Browse files
option(future.delete=FALSE) now prevents the batchtools registry folder from being deleted [#37]
1 parent f09c487 commit f113e56

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

NEWS

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: future.batchtools
22
==========================
33

4-
Version: 0.7.2-9000 [2019-04-25]
4+
Version: 0.7.2-9000 [2019-05-02]
55

66
NEW FEATURES:
77

@@ -10,6 +10,9 @@ NEW FEATURES:
1010
* Now a more informative error message is produced if a batchtools *.tmpl
1111
template file was not found.
1212

13+
* Setting option 'future.delete' to FALSE will now prevent removal of the
14+
batchtools registry folders.
15+
1316
BUG FIXES:
1417

1518
* Argument 'workers' could not be a function.

R/BatchtoolsFuture-class.R

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,13 @@ delete.BatchtoolsFuture <- function(future,
640640
}
641641
}
642642

643+
## Have user disabled deletions?
644+
if (!getOption("future.delete", TRUE)) {
645+
msg <- sprintf("Option 'future.delete' is FALSE - will not delete batchtools registry: %s", sQuote(path))
646+
mdebugf("delete(): %s", msg)
647+
return(invisible(FALSE))
648+
}
649+
643650
## Control batchtools info output
644651
oopts <- options(batchtools.verbose = debug)
645652
on.exit(options(oopts))

0 commit comments

Comments
 (0)