-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
include filename in error: could not read file
message
#1530
Comments
Giving this the quick eyeball, I'm curious as to why 'build' is passing file/open in boot.janet and instead failing in fread; file/open at least returns the filename in the error. Edit: oddly, when I type the same
|
I think if one does
If the
|
That is odd because I get the full error message regardless of the directories existence; on Windows 🤨 Edit: can confirm what you see on my linux box too |
https://stackoverflow.com/questions/42876210/c-fopen-opening-directories Seems fopen has a quirk about detecting directories with write mode
So if fopen is called with |
I was building a project with
janet build
mistakenly instead ofjpm build
and gotas a result.
This isn't particularly helpful and it would be neat if the message included the name of the file it tried to read.
Looks like the error comes from
janet/src/core/io.c
Line 188 in 83e8aab
JanetFile
, which doesn't include the filename, only aFILE*
:janet/src/include/janet.h
Lines 1248 to 1251 in 83e8aab
So possible solutions could be
JanetFile
/proc/self/fd/NNN
orF_GETPATH
orF_GETPATH
orGetFileInformationByHandleEx
on windows? would need to investigate)if this is in scope for janet
The text was updated successfully, but these errors were encountered: