You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The read_delim function accepts literal data when the file argument contains a newline, however, it will still attempt to access a file whose name is the literal data. This is because read_delimited will call empty_file on the literal data, which will (on Linux) end up calling the stat syscall.
Easily reproduced with:
[bash] strace -e trace=stat R
[r] library ('readr')
[r] read_delim ('this\nshould\nnot\nhappen', delim = ',')
[console] stat("this\nshould\nnot\nhappen", 0x7ffd6298e220) = -1 ENOENT (No such file or directory)
The function works in that it then correctly parses the literal data, but it is still strange that it should use the literal data to access the file system. (In general, it feels like doing autodetect on the file argument rather than distinguishing files, links and literal data through different arguments is somewhat fragile, and perhaps even not very useful.)
The text was updated successfully, but these errors were encountered:
The
read_delim
function accepts literal data when thefile
argument contains a newline, however, it will still attempt to access a file whose name is the literal data. This is becauseread_delimited
will callempty_file
on the literal data, which will (on Linux) end up calling thestat
syscall.Easily reproduced with:
The function works in that it then correctly parses the literal data, but it is still strange that it should use the literal data to access the file system. (In general, it feels like doing autodetect on the
file
argument rather than distinguishing files, links and literal data through different arguments is somewhat fragile, and perhaps even not very useful.)The text was updated successfully, but these errors were encountered: