From 52e2b3df3505eefa5bb05a278420cdf5849360b3 Mon Sep 17 00:00:00 2001 From: drwtsn32x Date: Mon, 24 Jun 2019 08:32:37 -0700 Subject: [PATCH] Add support for B2 'prefix' API parameter when listing files --- Duplicati/Library/Backend/Backblaze/B2.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Duplicati/Library/Backend/Backblaze/B2.cs b/Duplicati/Library/Backend/Backblaze/B2.cs index a469bdc6b..d1e811d92 100644 --- a/Duplicati/Library/Backend/Backblaze/B2.cs +++ b/Duplicati/Library/Backend/Backblaze/B2.cs @@ -320,7 +320,8 @@ namespace Duplicati.Library.Backend.Backblaze string.Format("{0}/b2api/v1/b2_list_file_versions", m_helper.APIUrl), new ListFilesRequest() { BucketID = Bucket.BucketID, - MaxFileCount = m_pagesize, + MaxFileCount = m_pagesize, + Prefix = m_prefix, StartFileID = nextFileID, StartFileName = nextFileName } @@ -506,6 +507,8 @@ namespace Duplicati.Library.Backend.Backblaze public string StartFileID { get; set; } [JsonProperty("maxFileCount")] public long MaxFileCount { get; set; } + [JsonProperty("prefix")] + public string Prefix { get; set; } } private class ListFilesResponse