If we have relative path in includeAll (eg: <includeAll
path="../y"/>) then absolute path is entered in FILENAME column of
DATABASECHANGELOG table as of 3.5.3 version and this issue is blocking us from uptaking this version.
Please find attached the test case.
I tried to make a change in FileSystemResourceAccessor#list method. Could you please review if this is the way to go?
Please find attached the test case.
I tried to make a change in FileSystemResourceAccessor#list method. Could you please review if this is the way to go?
- diff --git a/liquibase-core/src/main/java/liquibase/resource/FileSystemResourceAccessor.java b/liquibase-core/src/main/java/liquibase/resource/FileSystemResourceAccessor.java
index cfdbfb8..2750a19 100644
--- a/liquibase-core/src/main/java/liquibase/resource/FileSystemResourceAccessor.java
+++ b/liquibase-core/src/main/java/liquibase/resource/FileSystemResourceAccessor.java
@@ -138,6 +138,9 @@ public class FileSystemResourceAccessor extends AbstractResourceAccessor {
break;
}
}
+ if(this.baseDirectory == null){
+ returnPath = returnPath.substring(returnPath.lastIndexOf(path));
+ }
finalReturnSet.add(returnPath);
}
return finalReturnSet;