connectapi icon indicating copy to clipboard operation
connectapi copied to clipboard

Clean up `bundle_path()` error handling

Open colearendt opened this issue 3 years ago • 1 comments

  • [ ] check that manifest.json is in the tar archive:
"./manifest.json" %in% utils::untar(filepath, list = TRUE)
  • [ ] check that the filetype is a .tar.gz? Not sure how to do this...
  • [ ] check that file actually exists

Could put some of these checks into the Bundle R6 class if we want too...

colearendt avatar Nov 11 '21 00:11 colearendt

check that manifest.json is in the tar archive:

I've noticed when using download_bundle, sometimes it is "manifest.json" and other times it is "./manifest.json" that is present. I don't know why, but I wonder if this can the case depending on how the tarball is created?

check that the filetype is a .tar.gz? Not sure how to do this...

Is this just making sure the file at filepath is just a valid tarball? Can we just list the contents and if that fails bail out?

check that file actually exists

Is this just checking that there is actually a file at filepath?

brooklynbagel avatar May 02 '24 05:05 brooklynbagel