-
-
Notifications
You must be signed in to change notification settings - Fork 179
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
[feature] Make sure to correctly resolve binary resources from the database as well as XML resources #977
Conversation
an error popped up:
|
* Simplify a path removing any "." and ".." path elements. | ||
* Assumes an absolute path is given. | ||
*/ | ||
private String normalizePath(final String path) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I 'd hope that such a method would already exist either in our codebase or in an e.g. apache library :-)
It is probably useful on several locations.....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dizzzz I added a commit to remove some dead code which did nothing previously. This code was previously a sub-class in org.exist.xquery.functions.transform.Transform
, I just moved it out and extended it to be more flexible.
There is also the org.exist.validation.resolver.unstable.ExistResolver
which you added but it is marked unstable and the validation code can lead to deadlocks - #558
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I marked unstable because it was work in progress, but was not really finished over time :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dizzzz Okay, if it is unused should we remove it? If not perhaps switch to using the one I extended?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes sounds good. your code looks much better.... You have used some constructs I need to study :-)
…tabase as well as XML resources
f5be5e5
to
d870a86
Compare
@dizzzz I fixed the file naming issue... I hate the fact that filenames on OSX filesystem are case-insensitive but preserving, I mean who decided that was even remotely a good idea??? |
yes, it s*cks ; you can actually switch it off, but that might have serious consequences. |
final Source source; | ||
if (doc instanceof BinaryDocument) { | ||
final Path p = broker.getBinaryFile((BinaryDocument) doc); | ||
source = new StreamSource(p.toFile()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
he...... do we have here direct access to the Files deep down in WEBINF/data ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes we have direct access to binary files in WEB-INF/data/fs for the purpose of reading
Closes #952