lujiefsi commented on a change in pull request #5066:
URL: https://github.com/apache/cloudstack/pull/5066#discussion_r660244223



##########
File path: core/src/main/java/com/cloud/storage/JavaStorageLayer.java
##########
@@ -217,6 +229,19 @@ public boolean mkdirs(String path) {
         }
     }
 
+    public boolean isWorldReadable(File file) throws IOException {
+        Set<PosixFilePermission> permissions;
+        permissions = Files.getPosixFilePermissions(
+            Paths.get(file.getAbsolutePath()));
+
+        for (PosixFilePermission permission:permissions) {
+            if (permission.equals(PosixFilePermission.OTHERS_READ)) {
+                return true;
+            }

Review comment:
       have simplified it.




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


Reply via email to