Closed aylapear closed 1 year ago
Clearly it does have to do with the temp directory not clearing out after the function has finished executing:
> library(wqbench)
> wqb_download_epa_ecotox(file_path = "data_dl", version = 1)
Downloading...
|====================================================================================================================================| 100%
[1] "unzip sub"
[1] "/var/folders/yr/tq_q43k50m795hb4y0njhyth0000gn/T//RtmpFnCDb1/unzip"
[1] "dirs"
[1] "" "ecotox_ascii_12_15_2022" "ecotox_ascii_12_15_2022/validation"
> wqb_download_epa_ecotox(file_path = "data_dl", version = 2)
Downloading...
|====================================================================================================================================| 100%
[1] "unzip sub"
[1] "/var/folders/yr/tq_q43k50m795hb4y0njhyth0000gn/T//RtmpFnCDb1/unzip"
[1] "dirs"
[1] "" "ecotox_ascii_12_15_2022" "ecotox_ascii_12_15_2022/validation"
[4] "validation"
There were 50 or more warnings (use warnings() to see the first 50)
> warnings()
Warning messages:
1: In file.create(to[okay]) :
cannot create file 'data_dl/ecotox_ascii_09_15_2022/ecotox_ascii_12_15_2022/AsciiDownloadHelp5.pdf', reason 'No such file or directory'
If the R session is restarted then it is fine:
Restarting R session...
> library(wqbench)
> wqb_download_epa_ecotox(file_path = "data_dl", version = 2)
Downloading...
|====================================================================================================================================| 100%
[1] "unzip sub"
[1] "/var/folders/yr/tq_q43k50m795hb4y0njhyth0000gn/T//RtmpLvuHGt/unzip"
[1] "dirs"
[1] "" "validation"
Folders copy correctly but something is going wrong as the folders are nested. Potentially an issue with the temp directory not clearing out.
Full set of calls to the function