Skip to content

Commit 8d1e5c4

Browse files
committed
fix: migration warning on NTFS filesystem was broken
1 parent 37f4c98 commit 8d1e5c4

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

  • velocity/src/main/java/dev/objz/commandbridge/velocity

velocity/src/main/java/dev/objz/commandbridge/velocity/Main.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,12 @@ private void checkLegacyInstallation() {
331331
Path oldFolder = dataDir.getParent().resolve("CommandBridge");
332332
if (!Files.isDirectory(oldFolder)) return;
333333

334+
try {
335+
if (Files.isSameFile(oldFolder, dataDir)) return;
336+
} catch (IOException ignored) {
337+
return;
338+
}
339+
334340
legacyDetected = true;
335341
Log.warn("Detected old CommandBridge installation at '{}'. Please view the migration guide: https://cb.objz.dev/docs/migration/", oldFolder);
336342
}

0 commit comments

Comments
 (0)