Skip to content

Commit

Permalink
sp_drive() bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sambtalcott committed Nov 26, 2024
1 parent 6eaaa38 commit e4dedf3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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"),
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion R/sp_.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e4dedf3

Please sign in to comment.