diff --git a/DESCRIPTION b/DESCRIPTION index b586e20..03f51b4 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: tntpr Title: Data Analysis Tools Customized for TNTP -Version: 1.2.0 +Version: 1.2.1 Authors@R: c( person("Dustin", "Pashouwer", role = c("aut", "cre"), email = "dustin.pashouwer@tntp.org"), diff --git a/NEWS.md b/NEWS.md index 7c70ab0..bd328d1 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,8 @@ +# tntpr 1.2.1 + +* Fixed bug in `sp_drive()` when providing a site that didn't match the current + default. + # tntpr 1.2.0 * Added sp_*() family of functions for reading from / writing to Sharepoint. diff --git a/R/sp_.R b/R/sp_.R index d80c51b..fb0914e 100644 --- a/R/sp_.R +++ b/R/sp_.R @@ -175,7 +175,7 @@ sp_drive <- function(drive = NULL, site = NULL) { # No drive provided: Use the default drive (if site matches and it exists), or use the first drive if (is.null(drive)) { - if (all.equal(site, .sp_env$site) && !is.null(.sp_env$drive)) { + if (isTRUE(all.equal(site, .sp_env$site)) && !is.null(.sp_env$drive)) { .sp_env$drive } else { # If there is no default drive, get_drive() produces an error, so use the first listed drive