diff --git a/core/src/main/java/com/questdb/factory/configuration/JournalConfigurationImpl.java b/core/src/main/java/com/questdb/factory/configuration/JournalConfigurationImpl.java
index bc4edbeb9c2638014eedf918ffa4c4cae2bdb990..99f867a3cac696253e87f654e55473aedccc1b0d 100644
--- a/core/src/main/java/com/questdb/factory/configuration/JournalConfigurationImpl.java
+++ b/core/src/main/java/com/questdb/factory/configuration/JournalConfigurationImpl.java
@@ -160,17 +160,19 @@ class JournalConfigurationImpl implements JournalConfiguration {
try (CompositePath oldName = new CompositePath()) {
try (CompositePath newName = new CompositePath()) {
String path = journalBase.getAbsolutePath();
+
+ oldName.of(path).concat(location).$();
+ newName.of(path).concat(to).$();
+
+ if (!Files.exists(oldName)) {
+ throw new JournalException("Journal does not exist");
+ }
+
if (Os.type == Os.WINDOWS) {
oldName.of("\\\\?\\").concat(path).concat(location).$();
newName.of("\\\\?\\").concat(path).concat(to).$();
- } else {
- oldName.of(path).concat(location).$();
- newName.of(path).concat(to).$();
}
- if (!Files.exists(oldName)) {
- throw new JournalException("Journal does not exist");
- }
Lock lock = LockManager.lockExclusive(oldName.toString());
try {
diff --git a/examples/pom.xml b/examples/pom.xml
index b3dcb966470d9bc67b208055a2ea85005fe807de..fad35c42785154c861026e78d7cf751c338ba786 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -29,7 +29,7 @@
UTF-8
- 1.0.1-SNAPSHOT
+ 1.0.1
org.questdb
examples
jar