Skip to content

Commit

Permalink
Fixed windows casing bug on setting credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
sambtalcott committed Dec 14, 2024
1 parent cefb72c commit eff277e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions R/backend-wincred.R
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,14 @@ b_wincred_set_with_raw_value <- function(self, private, service,

keyring <- keyring %||% private$keyring
target <- b_wincred_target(keyring, service, username)

# Check for mis-cased target
stored <- b_wincred_i_enumerate("*")
if ((!target %in% stored) && (tolower(target) %in% tolower(stored))) {
# Automatically update case
target <- stored[tolower(stored) == tolower(target)]
}

if (is.null(keyring)) {
b_wincred_i_set(target, password, username = username)
return(invisible(self))
Expand Down

0 comments on commit eff277e

Please sign in to comment.