Fix Windows builds.
@@ -1311,6 +1311,9 @@ public static Path setReadOnly(final Path path, final boolean readOnly, final Li
} catch (final IOException e) {
// Retry with POSIX below.
}
+ if (!isPosix(path, linkOptions)) {
+ throw new IOException(String.format("DOS or POSIX file operations not available for '%s' %s", path, Arrays.toString(linkOptions)));
+ }
// POSIX
if (readOnly) {
// RO
