sid-srini commented on code in PR #9263:
URL: https://github.com/apache/netbeans/pull/9263#discussion_r3242000880


##########
extide/gradle/test/unit/src/org/netbeans/modules/gradle/spi/GradleFilesTest.java:
##########
@@ -38,6 +40,15 @@ public class GradleFilesTest {
     @Rule
     public TemporaryFolder root = new TemporaryFolder();
 
+    private static File normalizeTempDir(File root) {
+        if (root != null && Utilities.isMac()) {
+            String absolutePath = root.getAbsolutePath();
+            if (absolutePath.startsWith("/private/")) {
+                return new File(absolutePath.substring(8));
+            }
+        }

Review Comment:
   Thanks. I will add a comment in the source code, similar to the commit 
message and PR:
   > Needed due to the presence of "/private" prefix in the canonical path of 
unix temp folders.
   
   On MacOS X 10.5 and all later macOS, the unix temporary folder "/tmp" is 
actually a symbolic link to "/private/tmp". This is the reason for the 
additional check since the test libraries and Java itself, set the tmpdir as 
"/tmp/..." but the path checks after canonicalization require testing against 
"/private/tmp/..."
   
   I hope this clarifies this addition. Thanks.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
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

Reply via email to