Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WFGP-259] Use the native FS path as the moduleTemplates map key, not the… #268

Merged
merged 1 commit into from
Nov 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -632,8 +632,10 @@ public FileVisitResult visitFile(Path file, BasicFileAttributes attrs)
throws IOException {
if (WfConstants.MODULE_XML.equals(file.getFileName().toString())) {
final String relativePath = source.relativize(file).toString();
moduleTemplates.put(relativePath, fpArtifacts);
Files.copy(file, moduleTemplatesDir.resolve(relativePath), StandardCopyOption.REPLACE_EXISTING);
Path nativeCopy = Files.copy(file, moduleTemplatesDir.resolve(relativePath), StandardCopyOption.REPLACE_EXISTING);
// Use the native FS path as the map key, not the source path, which may be from ZipFileSystem
// and won't match the path of the actual template file we just wrote
moduleTemplates.put(moduleTemplatesDir.relativize(nativeCopy).toString(), fpArtifacts);
} else {
final Path target = wildflyHome.resolve(MODULES).resolve(source.relativize(file).toString());
Files.createDirectories(target.getParent());
Expand Down
Loading