Skip to content

Commit e8efbf9

Browse files
committed
Merge branch 'path-sym-links' into 'main'
Change path resolution to avoid getCanonicalFile so that symbolic links are... See merge request weblogic-cloud/weblogic-deploy-tooling!1750
2 parents 323b94d + b594c07 commit e8efbf9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

core/src/main/java/oracle/weblogic/deploy/util/FileUtils.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ public static File getCanonicalFile(File f) {
104104
File canonicalFile = null;
105105
if (f != null) {
106106
try {
107-
canonicalFile = f.getCanonicalFile();
108-
} catch (IOException ioe) {
109-
LOGGER.warning("WLSDPLY-01100", ioe, f.getPath(), ioe.getLocalizedMessage());
107+
canonicalFile = f.toPath().toAbsolutePath().normalize().toFile();
108+
} catch (Exception ex) {
109+
LOGGER.warning("WLSDPLY-01100", ex, f.getPath(), ex.getLocalizedMessage());
110110
canonicalFile = f.getAbsoluteFile();
111111
}
112112
}
@@ -683,7 +683,7 @@ static Set<PosixFilePermission> getPermissions(int octals) {
683683
}
684684

685685
private static File validatePathNameInternal(String pathName, String emptyErrorKey) {
686-
final String METHOD = "validatePathyNameInternal";
686+
final String METHOD = "validatePathNameInternal";
687687

688688
LOGGER.entering(CLASS, METHOD, pathName, emptyErrorKey);
689689
if (StringUtils.isEmpty(pathName)) {

0 commit comments

Comments
 (0)