CyrusYip 我这边没有复现。 https://d.cosx.org/d/424356-r43ban-ben-zhong-dirhan-shu-huo-qu-bu-liao-quan-bu-wen-jian/4
nan.xiao 可能和这个变更有关: R on Windows is now able to work with path names longer than 260 characters when these are enabled in the system (requires at least Windows 10 version 1607). Packages should be updated to work with long paths as well, instead of assuming PATH_MAX to be the maximum length. Custom front-ends and applications embedding R need to update their manifests if they wish to allow this feature. See https://blog.r-project.org/2023/03/07/path-length-limit-on-windows for more information. 可以试试 fs::dir_ls().
shunwang 这个错误仅在 R 4.3.3及之后的版本修复。R4.3.0不包含此修复。 * list.files() on Windows now returns also files with names longer that 260 bytes (the Windows limit is 260 characters). Previously, some file names particularly with 'East Asian' characters were omitted.