diff --git a/src/clj_gcloud/storage.clj b/src/clj_gcloud/storage.clj index cac8b39..3fd03c7 100644 --- a/src/clj_gcloud/storage.clj +++ b/src/clj_gcloud/storage.clj @@ -243,5 +243,10 @@ Usage : (download-file-from-storage storage-client 'gs://mybucket/myfolder/.../myfile' 'mylocalfile')" [^Storage storage source-gs-uri dest-local-path & _options] - (let [blob (->> source-gs-uri ->blob-id (get-blob storage))] - (.downloadTo blob (Paths/get dest-local-path (make-array String 0)) (into-array Blob$BlobSourceOption [])))) + (let [^Blob blob (->> source-gs-uri ->blob-id (get-blob storage)) + path (Paths/get dest-local-path (make-array String 0)) + ;; this resolves reflection but it's pretty ugly: + ;; ^"[Lcom.google.cloud.storage.Blob$BlobSourceOption;" opts (into-array Blob$BlobSourceOption []) + ;; for now skip it, since we pass no options anyway + ] + (.downloadTo blob path))) diff --git a/test/clj_gcloud/storage_test.clj b/test/clj_gcloud/storage_test.clj index 5fb8388..584e19a 100644 --- a/test/clj_gcloud/storage_test.clj +++ b/test/clj_gcloud/storage_test.clj @@ -58,4 +58,3 @@ (is (delete-blob *storage* (.getBlobId blob))) (is (= 0 (count (ls *storage* dest-uri))))) (.delete tmp)))) -