Skip to content

fread's file.info call is impacted by R 4.5 change to warnings behavior #6918

@ProfFancyPants

Description

@ProfFancyPants

R's update to file.info() has changed how warnings work so that if one is trying to use fread on a network file where the owner of the file cannot be resolved, it throws a warning:

Warning in file.info(file) :
  cannot resolve owner of file '\\\\SomeVPN\\someFolder\\someCSV.csv': No mapping between account names and security IDs was done
Calls: <Anonymous> -> file.info

file.info has an argument extra_cols = TRUE which looks for the exe, uname, and udomain for the file, and can be turned off by setting the argument to FALSE. fread calls the function here to read the size and isdir information, and doesn't seem to need the extra fields. I would suggest calling file_info = file.info(file, extra_cols = FALSE) instead.

> sessionInfo()
R version 4.5.0 (2025-04-11 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 11 x64 (build 22631)

Matrix products: default
  LAPACK version 3.12.1

locale:
[1] LC_COLLATE=English_United States.utf8  LC_CTYPE=English_United States.utf8    LC_MONETARY=English_United States.utf8 LC_NUMERIC=C                           LC_TIME=English_United States.utf8    

time zone: America/New_York
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] RDCOMClient_0.96-1 TBmisc_1.1.11      data.table_1.17.99 magrittr_2.0.3     stringr_1.5.1.9000

loaded via a namespace (and not attached):
  [1] audio_0.1-11          rstudioapi_0.17.1     jsonlite_2.0.0        magick_2.8.6          rmarkdown_2.29.1      fs_1.6.6              vctrs_0.6.5           memoise_2.0.1         askpass_1.2.1         base64enc_0.1-3      
 [11] webshot_0.5.5         tinytex_0.57          htmltools_0.5.8.1     forcats_1.0.0         usethis_3.1.0         curl_6.2.2            haven_2.5.4.9000      cpp11_0.5.2           openxlsx2_1.14.0.9000 cellranger_1.1.0     
 [21] Formula_1.2-5         qualtRics_3.2.1.9000  googlesheets4_1.1.1   htmlwidgets_1.6.4     desc_1.4.3            plyr_1.8.9            lubridate_1.9.4       cachem_1.1.0          mime_0.13             lifecycle_1.0.4      
 [31] pkgconfig_2.0.3       fuzzyjoin_0.1.6       sjlabelled_1.2.0      R6_2.6.1              fastmap_1.2.0         shiny_1.10.0          snakecase_0.11.1      digest_0.6.37         colorspace_2.1-1      ps_1.9.1             
 [41] rebus.numbers_0.0-1   pkgload_1.4.0         Hmisc_5.2-3           whereami_0.2.0        timechange_0.3.0      httr_1.4.7            abind_1.4-8           compiler_4.5.0        rebus.datetimes_0.0-2 gargle_1.5.2         
 [51] remotes_2.5.0         pander_0.6.6          bit64_4.6.0-1         withr_3.0.2           htmlTable_2.4.3       backports_1.5.0       inline_0.3.21         carData_3.0-5         pkgbuild_1.4.7        MASS_7.3-65          
 [61] openssl_2.3.2         rappdirs_0.3.3        sessioninfo_1.2.3     rebus.base_0.0-3      tools_4.5.0           foreign_0.8-90        googledrive_2.1.1     zip_2.3.2             httpuv_1.6.15         nnet_7.3-20          
 [71] glue_1.8.0            callr_3.7.6           promises_1.3.2        grid_4.5.0            checkmate_2.3.2       cluster_2.1.8.1       reshape2_1.4.4        generics_0.1.3        gtable_0.3.6          tzdb_0.5.0           
 [81] tidyr_1.3.1           hms_1.1.3             xml2_1.3.8            car_3.1-3             pillar_1.10.2         vroom_1.6.5           later_1.4.2           dplyr_1.1.4           pryr_0.1.6            bit_4.6.0            
 [91] tidyselect_1.2.1      miniUI_0.1.1.1        pbapply_1.7-2         knitr_1.50.4          gridExtra_2.3         stringb_0.0.0.9000    xfun_0.52             rapportools_1.2       matrixStats_1.5.0     devtools_2.4.5       
[101] brio_1.1.5            stringi_1.8.7         rematch_2.0.0         lazyeval_0.2.2        yaml_2.3.10           evaluate_1.0.3        codetools_0.2-20      beepr_2.0             tcltk_4.5.0           archive_1.1.12       
[111] tibble_3.2.1          cli_3.6.4             rpart_4.1.24          xtable_1.8-4          munsell_0.5.1         processx_3.8.6        rebus_0.1-3           Rcpp_1.0.14           summarytools_1.1.3    anytime_0.3.11       
[121] parallel_4.5.0        ellipsis_0.3.2        ggplot2_3.5.2         readr_2.1.5           rebus.unicode_0.0-2   profvis_0.4.0         urlchecker_1.0.1      scales_1.3.0          openxlsx_4.1.1        insight_1.1.0        
[131] purrr_1.0.4           crayon_1.5.3          rlang_1.1.6           decor_1.0.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions