diff --git a/R/message.R b/R/message.R index 9462bb7..475358a 100644 --- a/R/message.R +++ b/R/message.R @@ -239,6 +239,10 @@ gm_save_attachments <- function(x, !is.null(part$filename) && part$filename != "", x$payload$parts) } + # remove `:` from file name + if (length(attachments_parts) >0){ + attachments_parts[[1]]$filename <- gsub(":","_",attachments_parts[[1]]$filename) + } invisible(vapply(attachments_parts, function(part) { att <- attachment(part$body$attachmentId, x$id, user_id) save_attachment(att, file.path(path, part$filename)) diff --git a/gmailr.Rproj b/gmailr.Rproj index 270314b..6daccaa 100644 --- a/gmailr.Rproj +++ b/gmailr.Rproj @@ -1,21 +1,21 @@ -Version: 1.0 - -RestoreWorkspace: Default -SaveWorkspace: Default -AlwaysSaveHistory: Default - -EnableCodeIndexing: Yes -UseSpacesForTab: Yes -NumSpacesForTab: 2 -Encoding: UTF-8 - -RnwWeave: Sweave -LaTeX: pdfLaTeX - -AutoAppendNewline: Yes -StripTrailingWhitespace: Yes - -BuildType: Package -PackageUseDevtools: Yes -PackageInstallArgs: --no-multiarch --with-keep.source -PackageRoxygenize: rd,collate,namespace +Version: 1.0 + +RestoreWorkspace: Default +SaveWorkspace: Default +AlwaysSaveHistory: Default + +EnableCodeIndexing: Yes +UseSpacesForTab: Yes +NumSpacesForTab: 2 +Encoding: UTF-8 + +RnwWeave: Sweave +LaTeX: pdfLaTeX + +AutoAppendNewline: Yes +StripTrailingWhitespace: Yes + +BuildType: Package +PackageUseDevtools: Yes +PackageInstallArgs: --no-multiarch --with-keep.source +PackageRoxygenize: rd,collate,namespace