Skip to content
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

XML read doesn't return error when file doesn't exist #143

Open
avilleret opened this issue Nov 2, 2015 · 0 comments
Open

XML read doesn't return error when file doesn't exist #143

avilleret opened this issue Nov 2, 2015 · 0 comments

Comments

@avilleret
Copy link
Contributor

On Ubuntu, if path is a directory, I do receive a non-zero error code.
If it is a file it returns 0.
But if it point to nothing (i.e. the file doesn't exists) it also returns 0.
This is weird and thus I have no clue if the file correctly read.

I didn't test on other platform.
The code involved for this test is on JamomaPureData repo but something similar appear in JamomaMax code.
see : https://github.com/jamoma/JamomaPureData/blob/master/library/source/JamomaForPd.cpp#L130

AFAIK, this might be due to libxml xmlNewTextReaderFilename() method that doesn't return an error code when the file doesn't exist. So this is a bug of libxml2. But I think we can find a workaround.

@avilleret avilleret changed the title Jamoma TTerr TTObject.send("read", path) doesn't return error when file doesn't exist XML read doesn't return error when file doesn't exist Nov 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant