From e7a6bcbfc9b039dc5788a1155c6b17f1dfdc5112 Mon Sep 17 00:00:00 2001 From: patrickbarks Date: Wed, 4 Oct 2023 11:25:16 +0200 Subject: [PATCH] enable tilde expansion --- R/decrypt_wb.R | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/R/decrypt_wb.R b/R/decrypt_wb.R index d149404..5af3643 100644 --- a/R/decrypt_wb.R +++ b/R/decrypt_wb.R @@ -22,6 +22,9 @@ decrypt_wb <- function(path, password, path_out = tempfile(fileext = get_ext(path))) { + # python fns used below don't perform tilde expansion by default + path <- path.expand(path) + path_out <- path.expand(path_out) if (!get_ext(path) %in% c(".xlsx", ".xlsb")) { stop("Argument `path` must have extension .xlsx or .xlsb") @@ -31,7 +34,7 @@ decrypt_wb <- function(path, stop("Arguments `path` and `path_out` do not have the same extension") } - if (normalizePath(path, mustWork = FALSE) == normalizePath(path_out, mustWork = FALSE)) { + if (path == path_out) { stop("Arguments `path` and `path_out` must not be the same") }