Skip to content

Commit 9388842

Browse files
authored
[ISSUE #9899] Forbid windows sync directory (#10057)
1 parent f80753f commit 9388842

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • common/src/main/java/org/apache/rocketmq/common

common/src/main/java/org/apache/rocketmq/common/MixAll.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,9 @@ public static synchronized void fsyncDirectory(Path dir) throws IOException {
249249
if (!Files.isDirectory(dir)) {
250250
throw new NotDirectoryException(dir.toString());
251251
}
252-
252+
if (isWindows()) {
253+
return;
254+
}
253255
try (FileChannel fc = FileChannel.open(dir, StandardOpenOption.READ)) {
254256
fc.force(true);
255257
}

0 commit comments

Comments
 (0)