Skip to content
Snippets Groups Projects
Commit 6fc208e2 authored by juanf's avatar juanf
Browse files

SSDM-1201 : Bugfix, links are now created to latest webapp version.

SVN: 36281
parent 092bcdbe
No related branches found
No related tags found
No related merge requests found
......@@ -136,12 +136,24 @@ public class JettyWebAppPluginInjector
File webappFolder = new File(target, WEBAPP_FOLDER);
webappFolder.mkdirs();
File link = new File(webappFolder, webapp);
if (link.exists())
{
try
{
if (!folder.getCanonicalPath().equals(link.getCanonicalPath())) //Verifies they are pointing to the same version
{
link.delete();
}
} catch (Exception e)
{
operationLog.error("WebApp '" + webapp + "': Problem managing Symbolic link ", e);
}
}
if (link.exists() == false)
{
String linkPath = link.getAbsolutePath();
Unix.createSymbolicLink(path, linkPath);
operationLog.info("WebApp '" + webapp + "': Symbolic link " + linkPath + " -> "
+ path);
operationLog.info("WebApp '" + webapp + "': Symbolic link " + linkPath + " -> " + path);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment