зеркало из https://github.com/Azure/AzureStor.git
fix file listing for empty filesystem
This commit is contained in:
Родитель
83be55f762
Коммит
8136935d74
|
@ -1,6 +1,6 @@
|
|||
Package: AzureStor
|
||||
Title: Storage Management in 'Azure'
|
||||
Version: 3.5.1
|
||||
Version: 3.5.1.9000
|
||||
Authors@R: c(
|
||||
person("Hong", "Ooi", , "hongooi73@gmail.com", role = c("aut", "cre")),
|
||||
person("Microsoft", role="cph")
|
||||
|
|
4
NEWS.md
4
NEWS.md
|
@ -1,3 +1,7 @@
|
|||
# AzureStor 3.5.1.9000
|
||||
|
||||
- Fix a bug when listing files in an empty ADLS filesystem (#100).
|
||||
|
||||
# AzureStor 3.5.1
|
||||
|
||||
- Fix for changed behaviour in readr 2.0.0, where `readr::read_delim` now automatically closes an input connection (#95).
|
||||
|
|
|
@ -317,6 +317,9 @@ list_adls_files <- function(filesystem, dir="/", info=c("all", "name"),
|
|||
httr::stop_for_status(res, storage_error_message(res))
|
||||
dfchunk <- httr::content(res, simplifyVector=TRUE)$paths
|
||||
|
||||
if(length(dfchunk) == 0)
|
||||
break
|
||||
|
||||
# normalise output
|
||||
if(is.null(dfchunk$isDirectory))
|
||||
dfchunk$isDirectory <- FALSE
|
||||
|
|
|
@ -42,6 +42,8 @@ test_that("ADLSgen2 client interface works",
|
|||
expect_identical(fs, lst[["newfs1"]])
|
||||
|
||||
expect_true(is_empty(list_adls_files(fs, "/", info="name")))
|
||||
expect_is(list_adls_files(fs, "/"), "data.frame")
|
||||
expect_true(nrow(list_adls_files(fs, "/", info="all")) == 0)
|
||||
orig_file <- "../resources/iris.csv"
|
||||
new_file <- file.path(tempdir(), "iris.csv")
|
||||
upload_adls_file(fs, orig_file, "iris.csv", blocksize=1000)
|
||||
|
|
Загрузка…
Ссылка в новой задаче