|
6 | 6 | import java.util.Collections; |
7 | 7 | import java.util.Map; |
8 | 8 |
|
| 9 | +import org.flywaydb.core.api.CoreLocationPrefix; |
9 | 10 | import org.flywaydb.core.api.Location; |
10 | 11 | import org.flywaydb.core.api.callback.Callback; |
11 | 12 | import org.flywaydb.core.api.configuration.Configuration; |
| 13 | +import org.flywaydb.core.api.locations.LocationParser; |
12 | 14 | import org.flywaydb.core.api.migration.JavaMigration; |
13 | 15 | import org.flywaydb.core.api.resource.LoadableResource; |
14 | 16 | import org.flywaydb.core.internal.resource.classpath.ClassPathResource; |
@@ -44,12 +46,13 @@ public QuarkusPathLocationScanner(Configuration configuration, Collection<Locati |
44 | 46 | LOGGER.debugf("Loading %s", migrationFile); |
45 | 47 |
|
46 | 48 | scannedResources.add(new ClassPathResource(null, migrationFile, classLoader, StandardCharsets.UTF_8)); |
47 | | - } else if (migrationFile.startsWith(Location.FILESYSTEM_PREFIX)) { |
| 49 | + } else if (migrationFile.startsWith(CoreLocationPrefix.FILESYSTEM_PREFIX)) { |
48 | 50 | if (fileSystemScanner == null) { |
49 | | - fileSystemScanner = new FileSystemScanner(false, configuration); |
| 51 | + fileSystemScanner = new FileSystemScanner(configuration); |
50 | 52 | } |
51 | 53 | LOGGER.debugf("Checking %s for migration files", migrationFile); |
52 | | - Collection<LoadableResource> resources = fileSystemScanner.scanForResources(new Location(migrationFile)); |
| 54 | + Collection<LoadableResource> resources = fileSystemScanner |
| 55 | + .scanForResources(LocationParser.parseLocation(migrationFile)); |
53 | 56 | LOGGER.debugf("%s contains %d migration files", migrationFile, resources.size()); |
54 | 57 | scannedResources.addAll(resources); |
55 | 58 | } |
@@ -83,7 +86,7 @@ public Collection<LoadableResource> scanForResources() { |
83 | 86 |
|
84 | 87 | private boolean isClassPathResource(Collection<Location> locations, String migrationFile) { |
85 | 88 | for (Location location : locations) { |
86 | | - String locationPath = location.getPath(); |
| 89 | + String locationPath = location.getRootPath(); |
87 | 90 | if (!locationPath.endsWith(LOCATION_SEPARATOR)) { |
88 | 91 | locationPath += "/"; |
89 | 92 | } |
|
0 commit comments