Skip to content
Permalink
Browse files
troubleshooting
  • Loading branch information
leerho committed Nov 8, 2018
1 parent 633e5b7 commit bf8642875d60f132c918793338da224daf04d52c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
@@ -255,6 +255,7 @@ static boolean isFileReadOnly(final File file) {
bits |= ((permissions.contains(PosixFilePermission.OTHERS_WRITE)) ? 1 << 1 : 0);
bits |= ((permissions.contains(PosixFilePermission.OTHERS_EXECUTE)) ? 1 : 0);
// Here we are going to ignore the Owner Write & Execute bits to allow root/owner testing.
System.err.println(file.getName() + " : " + Integer.toBinaryString(bits));
return ((bits & 0477) == 0444);
}

@@ -116,9 +116,6 @@ public void simpleMap2() throws IOException {
File file =
new File(getClass().getClassLoader().getResource("GettysburgAddress.txt").getFile());
boolean ro = isFileReadOnly(file);
for (StackTraceElement ste : Thread.currentThread().getStackTrace()) {
System.err.println(ste);
}
assertTrue(ro);
try (WritableMapHandle rh = WritableMemory.map(file)) {
//

0 comments on commit bf86428

Please sign in to comment.