From e4d3c407b1827bede8da05d40b89a75506d85863 Mon Sep 17 00:00:00 2001 From: Hong Ooi Date: Fri, 26 Feb 2021 01:18:54 +1100 Subject: [PATCH] handle missing date column in list_adls_files --- NEWS.md | 1 + R/adls_client_funcs.R | 2 ++ 2 files changed, 3 insertions(+) diff --git a/NEWS.md b/NEWS.md index 4fa27ee..961b02e 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,7 @@ - Fix blob lease code that has been broken since launch (#77, #78). - Set the default starting time for a generated SAS to the recommended 15 minutes before the current time, to allow for clock skew. +- Fix `list_adls_files` to allow for a missing last-modified-date column (#82). # AzureStor 3.4.0 diff --git a/R/adls_client_funcs.R b/R/adls_client_funcs.R index 924d0cc..3bb7562 100644 --- a/R/adls_client_funcs.R +++ b/R/adls_client_funcs.R @@ -330,6 +330,8 @@ list_adls_files <- function(filesystem, dir="/", info=c("all", "name"), if(is.null(dfchunk$permissions)) dfchunk$permissions <- "" else dfchunk$permissions[is.na(dfchunk$permissions)] <- "" + if(is.null(dfchunk$lastModified)) + dfchunk$lastModified <- "" dfchunk <- dfchunk[c("name", "contentLength", "isDirectory", "lastModified", "permissions", "etag")] if(!is.null(dfchunk$contentLength))