Error extracting bundled jars forces download

Description

The CFMLEngineFactory uses File.renameTo to move an extracted bundle from the system temp directory (java.io.tmpdir defaults to /tmp) to the Lucee server bundles directory.

https://github.com/lucee/Lucee/blob/5.3.4/loader/src/main/java/lucee/loader/engine/CFMLEngineFactory.java#L800

The problem is on Linux, specifically on systems where the tmp directory lives on a different partition, Java's file rename does not move the file.

The effect is that no matter what, all bundles are always downloaded from releases.lucee.org. This prevents startup if the server in question is firewalled from that endpoint. It also causes unnecessary load on the server endpoints as the correct versions are already bundled into the loader jar.

Either the jars should be extracted directly to the server bundles directory, or use Files.move:

1 Files.move(Paths.get(temp.getAbsolutePath()), Paths.get(trg.getAbsolutePath()));

 

Environment

Fedora Linux

Status

Assignee

Unassigned

Reporter

Jesse Shaffer

Labels

None

Affects versions

5.3.3.14

Priority

New
Configure