jlahoda commented on a change in pull request #1204: [NETBEANS-2409](partial):
attempting to avoid FileUtil.normalizeFile …
URL: https://github.com/apache/netbeans/pull/1204#discussion_r281024527
##########
File path:
ergonomics/ide.ergonomics/src/org/netbeans/modules/ide/ergonomics/fod/FeatureProjectFactory.java
##########
@@ -140,7 +140,15 @@ Document dom(String relative) {
}
final boolean hasFile(String relative) {
- return dir.getFileObject(relative) != null;
+ FileObject d = dir;
+ int pos = 0;
+
+ while (relative.startsWith("../", pos) && d != null) {
Review comment:
Yes. I think there's something like this in openide.filesystems, but not in
masterfs. The reason I shied away from doing this in masterfs is that this
actually issues the FileObjects, and could be slower in some cases (on Linux,
AFAIK, normalizeFile is very cheap). I think here, the slowdown is probably OK,
but in masterfs, not so sure. I tried to implement without issuing the FOs, but
that seems to be beyond my knowledge.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists