From b549fa66e6e497e59d14418c1f70f8bd7edc919f Mon Sep 17 00:00:00 2001 From: nik Date: Wed, 25 Nov 2009 10:52:44 +0300 Subject: [PATCH] cleanup --- .../openapi/deployment/DeploymentUtilImpl.java | 14 +------------- .../openapi/deployment/DeploymentUtil.java | 15 ++------------- 2 files changed, 3 insertions(+), 26 deletions(-) diff --git a/java/compiler/impl/src/com/intellij/openapi/deployment/DeploymentUtilImpl.java b/java/compiler/impl/src/com/intellij/openapi/deployment/DeploymentUtilImpl.java index ec425424b1ce..6804b5ccc8eb 100644 --- a/java/compiler/impl/src/com/intellij/openapi/deployment/DeploymentUtilImpl.java +++ b/java/compiler/impl/src/com/intellij/openapi/deployment/DeploymentUtilImpl.java @@ -110,22 +110,10 @@ public class DeploymentUtilImpl extends DeploymentUtil { FileUtil.toSystemDependentName(toFile.getPath())); } - public final boolean addItemsRecursively(@NotNull BuildRecipe items, - @NotNull File root, - Module module, - String outputRelativePath, - @Nullable String possibleBaseOutputPath) { + public final boolean addItemsRecursively(@NotNull BuildRecipe items, @NotNull File root, String outputRelativePath) { if (outputRelativePath == null) outputRelativePath = ""; outputRelativePath = trimForwardSlashes(outputRelativePath); - if (possibleBaseOutputPath != null) { - File file = new File(possibleBaseOutputPath, outputRelativePath); - String relativePath = getRelativePath(root, file); - if (relativePath != null && !relativePath.startsWith("..") && relativePath.length() != 0) { - return false; - } - } - items.addFileCopyInstruction(root, true, outputRelativePath); return true; } diff --git a/java/compiler/openapi/src/com/intellij/openapi/deployment/DeploymentUtil.java b/java/compiler/openapi/src/com/intellij/openapi/deployment/DeploymentUtil.java index eada13236fc9..f086383b2a8f 100644 --- a/java/compiler/openapi/src/com/intellij/openapi/deployment/DeploymentUtil.java +++ b/java/compiler/openapi/src/com/intellij/openapi/deployment/DeploymentUtil.java @@ -41,10 +41,7 @@ public abstract class DeploymentUtil { @Nullable Set writtenPaths, @Nullable FileFilter fileFilter) throws IOException; - public abstract boolean addItemsRecursively(@NotNull BuildRecipe items, - @NotNull File root, - Module module, - String outputRelativePath, @Nullable String possibleBaseOutputPath); + public abstract boolean addItemsRecursively(@NotNull BuildRecipe items, @NotNull File root, String outputRelativePath); public static String trimForwardSlashes(@NotNull String path) { while (path.length() != 0 && (path.charAt(0) == '/' || path.charAt(0) == File.separatorChar)) { @@ -91,15 +88,7 @@ public abstract class DeploymentUtil { public abstract String getConfigFileErrorMessage(ConfigFile configFile); @Nullable - public static String getRelativePath(File baseDir, File file) { - if (baseDir == null || file == null) return null; - - String basePath = baseDir.getAbsolutePath(); - final String filePath = file.getAbsolutePath(); - return getRelativePath(basePath, filePath); - } - - @Nullable public static String getRelativePath(@NotNull String basePath, @NotNull final String filePath) { + public static String getRelativePath(@NotNull String basePath, @NotNull final String filePath) { if (basePath.equals(filePath)) return ""; if (!basePath.endsWith(File.separator)) basePath += File.separatorChar;