-
Notifications
You must be signed in to change notification settings - Fork 91
Description
When running the discover domain util, I have noticed the output archive filename has been generated incorrectly. When the tool creates a temporary zip filename, the generated filename incorrectly includes the parent directories twice.
23790/2: open("/home/shane/mydomain_archive.zip", O_RDONLY) = 460
23790/2: open("/home/shane/home/shane/mydomain_archive3568716833221357580.zip", O_RDWR|O_CREAT|O_EXCL, 0666) Err#2 ENOENT
The above truss output was produced with the archive file argument as -archive_file /home/shane/mydomain_archive.zip
.
It looks like nameComponents[0]
contains the full path (minus file extension), but should only contain the filename. createTempFile
takes the directory as a separate argument, so it is being prepended to the already full path.
weblogic-deploy-tooling/core/src/main/java/oracle/weblogic/deploy/util/WLSDeployZipFile.java
Line 787 in 1ff34b2
newOutputFile = File.createTempFile(nameComponents[0], DOT + nameComponents[1], directory); |
The problem may be below with getFileName
returning the full path.
weblogic-deploy-tooling/core/src/main/java/oracle/weblogic/deploy/util/WLSDeployZipFile.java
Line 778 in 1ff34b2
String[] nameComponents = FileUtils.parseFileName(getFileName()); |
weblogic-deploy-tooling/core/src/main/java/oracle/weblogic/deploy/util/WLSDeployZipFile.java
Lines 86 to 88 in 1ff34b2
public String getFileName() { | |
return getFile().getAbsolutePath(); | |
} |