Plugins: Automatic detection of site plugins fails to copy over the content to `_site`
closes #3707
This commit is contained in:
parent
fd4ab5c3dc
commit
e271177554
|
@ -204,10 +204,14 @@ public class PluginManager {
|
|||
if (!FileSystemUtils.hasExtensions(extractLocation, ".class", ".jar")) {
|
||||
log("Identified as a _site plugin, moving to _site structure ...");
|
||||
File site = new File(extractLocation, "_site");
|
||||
File tmpLocation = new File(environment.pluginsFile(), name + ".tmp");
|
||||
extractLocation.renameTo(tmpLocation);
|
||||
File tmpLocation = new File(environment.pluginsFile(), extractLocation.getName() + ".tmp");
|
||||
if (!extractLocation.renameTo(tmpLocation)) {
|
||||
throw new IOException("failed to rename in order to copy to _site (rename to " + tmpLocation.getAbsolutePath() + "");
|
||||
}
|
||||
FileSystemUtils.mkdirs(extractLocation);
|
||||
tmpLocation.renameTo(site);
|
||||
if (!tmpLocation.renameTo(site)) {
|
||||
throw new IOException("failed to rename in order to copy to _site (rename to " + site.getAbsolutePath() + "");
|
||||
}
|
||||
debug("Installed " + name + " into " + site.getAbsolutePath());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue