Closed kadyb closed 4 years ago
@Nowosad, can you confirm that in this case the connection to file is closed automatically?
name_file = "test.tiff"
tmp_SHA = as.character(openssl::sha1(file(name_file)))
Add in b931b6b
library("sf")
polygon = read_sf("test.gpkg")
req_df = orto_request(polygon = polygon)
orto_download(req_df[1, ])
as.character(openssl::sha1(file("43_67170_N-34-139-A-c-1-2.tif"))) == req_df[1, "sha1"]
#> TRUE
req_df_false = req_df
req_df_false[1, "sha1"] = "XXX"
orto_download(req_df_false[1, ], check_SHA = TRUE, quiet = TRUE)
#> Warning in orto_download(req_df2[1:2, ], check_SHA = TRUE, quiet = TRUE) :
#> 43_67170_N-34-139-A-c-1-2.tif incorrect SHA
It should be optional.
Does the connection to the file need to be closed?