Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.

Commit d762365

Browse files
committed
#422 DB file is passed to command for sub database
There's no change to the test, as this wasn't a bug in ml-app-deployer, but rather is helping avoid a bug in DHF until DHF can be fixed. It was really an oversight not to pass the subDatabaseFile in the first place, even though it's set on the command a few lines later.
1 parent 43080bd commit d762365

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/com/marklogic/appdeployer/command/databases/DeploySubDatabasesCommand.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ public void execute(CommandContext context) {
3838

3939
if (subdbDir.exists()) {
4040
List<String> subDbNames = new ArrayList<String>();
41-
for (File f : listFilesInDirectory(subdbDir)) {
42-
logger.info(format("Processing sub-database for %s found in file: %s", superDatabaseName, f.getAbsolutePath()));
41+
for (File subDatabaseFile : listFilesInDirectory(subdbDir)) {
42+
logger.info(format("Processing sub-database for %s found in file: %s", superDatabaseName, subDatabaseFile.getAbsolutePath()));
4343

44-
DeployDatabaseCommand subDbCommand = this.deployDatabaseCommandFactory.newDeployDatabaseCommand(null);
44+
DeployDatabaseCommand subDbCommand = this.deployDatabaseCommandFactory.newDeployDatabaseCommand(subDatabaseFile);
4545
// Sub databases should be created immediately so they can then be attached
4646
subDbCommand.setSupportsResourceMerging(false);
47-
subDbCommand.setDatabaseFile(f);
47+
subDbCommand.setDatabaseFile(subDatabaseFile);
4848
subDbCommand.setSuperDatabaseName(superDatabaseName);
4949
subDbCommand.setSubDatabase(true);
5050
subDbCommand.execute(context);

0 commit comments

Comments
 (0)