You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2019/05/05 14:31:42 UTC

[GitHub] [netbeans] jlahoda commented on a change in pull request #1204: [NETBEANS-2409](partial): attempting to avoid FileUtil.normalizeFile …

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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists