James Moger
2014-05-12 01ff0fa5f7392cfd73c3b722c99c12fdc3998dbe
Catch UnsatisfiedLinkException when setting filemode of generated SSH keys
1 files modified
4 ■■■■ changed files
src/main/java/com/gitblit/transport/ssh/SshDaemon.java 4 ●●●● patch | view | raw | blame | history
src/main/java/com/gitblit/transport/ssh/SshDaemon.java
@@ -212,8 +212,8 @@
            Files.touch(file);
            try {
                JnaUtils.setFilemode(file, JnaUtils.S_IRUSR | JnaUtils.S_IWUSR);
            } catch (UnsupportedOperationException e) {
                // Windows
            } catch (UnsatisfiedLinkError | UnsupportedOperationException e) {
                // Unexpected/Unsupported OS or Architecture
            }
            FileOutputStream os = new FileOutputStream(file);