Skip to content

Commit a2aa952

Browse files
committed
修复下载插件时没有自动创建文件夹的问题
1 parent 554b1fd commit a2aa952

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/main/java/com/xwintop/xJavaFxTool/plugin/PluginManager.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import okio.ForwardingSource;
3535
import okio.Okio;
3636
import okio.Source;
37+
import org.apache.commons.io.FileUtils;
3738
import org.apache.commons.io.IOUtils;
3839

3940
@Slf4j
@@ -129,6 +130,7 @@ public void loadLocalPlugins() {
129130

130131
/**
131132
* 添加本地插件。如果与已有插件同名,则替换已有插件信息
133+
*
132134
* @param jarFile 插件文件
133135
*/
134136
public AddPluginResult addPluginJar(File jarFile) {
@@ -205,6 +207,8 @@ public File downloadPlugin(
205207
}
206208

207209
File file = pluginJarInfo.getFile();
210+
FileUtils.forceMkdirParent(file);
211+
208212
this.currentProgressListener =
209213
(bytesRead, contentLength, done) -> onProgressUpdate.accept(contentLength, bytesRead);
210214

0 commit comments

Comments
 (0)