diff --git a/src/main/java/org/cryptomator/frontend/fuse/ReadWriteAdapter.java b/src/main/java/org/cryptomator/frontend/fuse/ReadWriteAdapter.java index e8a8355..810c312 100644 --- a/src/main/java/org/cryptomator/frontend/fuse/ReadWriteAdapter.java +++ b/src/main/java/org/cryptomator/frontend/fuse/ReadWriteAdapter.java @@ -160,7 +160,9 @@ public int chmod(String path, int mode, FileInfo fi) { LOG.warn("chmod {} failed, file not found.", path); return -errno.enoent(); } catch (UnsupportedOperationException e) { - LOG.warn("Setting posix permissions not supported by underlying file system."); + if (!WindowsUtil.IS_RUNNING_OS) { //prevent spamming warnings + LOG.warn("Setting posix permissions not supported by underlying file system."); + } return -errno.enosys(); } catch (IOException | RuntimeException e) { LOG.error("chmod {} failed.", path, e); diff --git a/src/main/java/org/cryptomator/frontend/fuse/WindowsUtil.java b/src/main/java/org/cryptomator/frontend/fuse/WindowsUtil.java new file mode 100644 index 0000000..d5705a1 --- /dev/null +++ b/src/main/java/org/cryptomator/frontend/fuse/WindowsUtil.java @@ -0,0 +1,10 @@ +package org.cryptomator.frontend.fuse; + +public class WindowsUtil { + + public static final boolean IS_RUNNING_OS = System.getProperty("os.name").toLowerCase().contains("windows"); + + private WindowsUtil() {} + + +}