ropensci-archive / bomrang

:warning: ARCHIVED :warning: Australian government Bureau of Meteorology (BOM) data client for R
Other
109 stars 26 forks source link

File paths for internal data are not specified correctly #22

Closed adamhsparks closed 7 years ago

adamhsparks commented 7 years ago

See: https://github.com/ropensci/onboarding/issues/121#issuecomment-310839849

The line (#34) destfile = paste0(tempdir(), "AAC_codes.dbf") is wrong because it won't insert the necessary system delimiter. All args should simply be passed to file.path, and not paste0. At it stands, this creates the .dbf file one directory up from tempdir(), with a name that is a mash of the last part of tempdir() plus the desired file name, so the function works but not really as intended. Critically, it creates a file outside the tempdir() of the current env, so will fail on any systems on which users do not have permission to do that!

adamhsparks commented 7 years ago

Fixed in https://github.com/ToowoombaTrio/bomrang/commit/73abda361c5fa70434df7f19a88b281fd4557de4