init: ensure that tmp dir exists before extracting plugins
There was wrong assumpion in '--list-plugins' implementation tmp dir was created before we start extracting plugins to obtain metadata about them. Ensure the tmp dir will be created if it is not existing yet. Change-Id: Iac29499940b3cb8255456b0dcf21e5e6e9870ecd Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
This commit is contained in:

committed by
Shawn Pearce

parent
a7bad77a08
commit
71de7c60e9
@@ -166,6 +166,9 @@ public class PluginLoader implements LifecycleListener {
|
||||
|
||||
public static File storeInTemp(String pluginName, InputStream in,
|
||||
SitePaths sitePaths) throws IOException {
|
||||
if (!sitePaths.tmp_dir.exists()) {
|
||||
sitePaths.tmp_dir.mkdirs();
|
||||
}
|
||||
return asTemp(in, tempNameFor(pluginName), ".jar", sitePaths.tmp_dir);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user