Skip to content

Commit 97890a5

Browse files
fixing aux image-related paths on Windows (#229)
1 parent d635385 commit 97890a5

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

electron/app/js/ipcRendererPreload.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ contextBridge.exposeInMainWorld(
262262
extname: (filePath) => path.extname(filePath),
263263
isAbsolute: (filePath) => path.isAbsolute(filePath),
264264
join: (...paths) => path.join(...paths),
265+
joinAndConvertToUnixPath: (...paths) => path.join(...paths).replaceAll('\\', '/'),
265266
delimiter: path.delimiter,
266267
isValidFileName: (fileName) => fsUtils.isValidFileName(fileName)
267268
},

webui/src/js/utils/k8s-domain-v8-resource-generator.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@ function(project, K8sDomainConfigMapGenerator, jsYaml, i18n) {
133133
const mountPoint = domainResource.spec.auxiliaryImageVolumes[0].mountPath;
134134
// Always set these since WKO aux image support makes these required
135135
domainResource.spec.configuration.model.wdtInstallHome =
136-
window.api.path.join(mountPoint, wdtRelatedPaths.targetWdtHomeDirName);
136+
window.api.path.joinAndConvertToUnixPath(mountPoint, wdtRelatedPaths.targetWdtHomeDirName);
137137
domainResource.spec.configuration.model.modelHome =
138-
window.api.path.join(mountPoint, wdtRelatedPaths.targetModelHomeDirName);
138+
window.api.path.joinAndConvertToUnixPath(mountPoint, wdtRelatedPaths.targetModelHomeDirName);
139139
} else {
140140
// Only set these if they are specified; otherwise, rely on the default values
141141
if (wdtRelatedPaths.wdtHome) {
@@ -230,7 +230,7 @@ function(project, K8sDomainConfigMapGenerator, jsYaml, i18n) {
230230
}
231231
}
232232
result.targetWdtHomeDirName = 'weblogic-deploy';
233-
result.sourceWdtHome = window.api.path.join(wdtHome, result.targetWdtHomeDirName);
233+
result.sourceWdtHome = window.api.path.joinAndConvertToUnixPath(wdtHome, result.targetWdtHomeDirName);
234234
result.sourceModelHome = modelHome;
235235
result.targetModelHomeDirName = window.api.path.basename(modelHome);
236236
} else {

webui/src/js/utils/k8s-domain-v9-resource-generator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ define(['models/wkt-project', 'utils/k8s-domain-configmap-generator', 'js-yaml',
243243
//
244244
let wdtInstallHome = this.project.image.wdtHomePath.value;
245245
if (!wdtInstallHome.endsWith(WDT_DIR_NAME)) {
246-
wdtInstallHome = window.api.path.join(wdtInstallHome, WDT_DIR_NAME);
246+
wdtInstallHome = window.api.path.joinAndConvertToUnixPath(wdtInstallHome, WDT_DIR_NAME);
247247
}
248248
if (usingAuxImage()) {
249249
if (usingExistingAuxImage()) {

0 commit comments

Comments
 (0)