Skip to content

Commit

Permalink
[#8336] DDLDatabase cannot load relative paths in Maven modules that …
Browse files Browse the repository at this point in the history
…do not contain wildcards
  • Loading branch information
lukaseder committed Feb 19, 2019
1 parent 426cc96 commit e377889
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions jOOQ-meta/src/main/java/org/jooq/meta/tools/FilePattern.java
Expand Up @@ -112,8 +112,14 @@ public static final void load(
load(encoding, file, fileComparator, null, loader);
loaded = true;
}
else if (pattern.contains("*") || pattern.contains("?")) {
file = new File(pattern.replaceAll("[*?].*", "")).getCanonicalFile();
else {

// [#8336] Relative paths aren't necessarily relative to the
// working directory, but maybe to some subdirectory
if (pattern.contains("*") || pattern.contains("?"))
file = new File(pattern.replaceAll("[*?].*", "")).getCanonicalFile();
else
file = new File(".").getCanonicalFile();

Pattern regex = Pattern.compile("^.*?"
+ pattern
Expand Down

0 comments on commit e377889

Please sign in to comment.