mirror of
https://github.com/xerial/snappy-java.git
synced 2025-07-26 23:44:10 +02:00
#48: Use standard chmod methods (setReadable, setWritable, etc.) instaead of calling chmod command
This commit is contained in:
parent
bbb30d35b8
commit
d26dce4415
@ -228,18 +228,9 @@ public class SnappyLoader
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set executable (x) flag to enable Java to load the native library
|
// Set executable (x) flag to enable Java to load the native library
|
||||||
if (!System.getProperty("os.name").contains("Windows")) {
|
extractedLibFile.setReadable(true);
|
||||||
try {
|
extractedLibFile.setWritable(true, true);
|
||||||
Runtime.getRuntime().exec(new String[] { "chmod", "755", extractedLibFile.getAbsolutePath() })
|
extractedLibFile.setExecutable(true);
|
||||||
.waitFor();
|
|
||||||
|
|
||||||
// Use following methods added since Java6 (If discarding Java5 is acceptable)
|
|
||||||
//extractedLibFile.setReadable(true);
|
|
||||||
//extractedLibFile.setWritable(true, true);
|
|
||||||
//extractedLibFile.setExecutable(true);
|
|
||||||
}
|
|
||||||
catch (Throwable e) {}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Check whether the contents are properly copied from the resource folder
|
// Check whether the contents are properly copied from the resource folder
|
||||||
|
Loading…
x
Reference in New Issue
Block a user