From 01ff0fa5f7392cfd73c3b722c99c12fdc3998dbe Mon Sep 17 00:00:00 2001 From: James Moger Date: Mon, 12 May 2014 08:18:53 -0400 Subject: Catch UnsatisfiedLinkException when setting filemode of generated SSH keys --- src/main/java/com/gitblit/transport/ssh/SshDaemon.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main/java/com/gitblit/transport/ssh/SshDaemon.java b/src/main/java/com/gitblit/transport/ssh/SshDaemon.java index a403699b..4d64cfb7 100644 --- a/src/main/java/com/gitblit/transport/ssh/SshDaemon.java +++ b/src/main/java/com/gitblit/transport/ssh/SshDaemon.java @@ -212,8 +212,8 @@ public class SshDaemon { 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); -- cgit v1.2.3