mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[platform] corrects directory checks in plugin installer actions
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.ide.startup;
|
||||
|
||||
import com.intellij.openapi.application.PathManager;
|
||||
@@ -129,7 +129,7 @@ public class StartupActionScriptManager {
|
||||
}
|
||||
|
||||
File destDir = destination.getParentFile();
|
||||
if (!(destDir.exists() || destDir.mkdirs())) {
|
||||
if (!(destDir.isDirectory() || destDir.mkdirs())) {
|
||||
throw new IOException("Cannot create directory: " + destDir);
|
||||
}
|
||||
|
||||
@@ -167,9 +167,8 @@ public class StartupActionScriptManager {
|
||||
throw new IOException("Source file missing: " + source);
|
||||
}
|
||||
|
||||
File destDir = destination.getParentFile();
|
||||
if (!(destDir.exists() || destDir.mkdirs())) {
|
||||
throw new IOException("Cannot create directory: " + destDir);
|
||||
if (!(destination.isDirectory() || destination.mkdirs())) {
|
||||
throw new IOException("Cannot create directory: " + destination);
|
||||
}
|
||||
|
||||
ZipUtil.extract(source, destination, myFilenameFilter);
|
||||
|
||||
Reference in New Issue
Block a user