From d22bf5b9a9f68cfa188de36714a38923cfe70a1c Mon Sep 17 00:00:00 2001 From: Simon Kaegi Date: Wed, 27 Feb 2008 04:06:54 +0000 Subject: Bug 220487 Error during install while creating blobstore folder --- .../p2/artifact/repository/simple/SimpleArtifactRepository.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java index 07a3c981c..e3feb7bc0 100644 --- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java +++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java @@ -628,13 +628,14 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme try { if (isFolderBased(newDescriptor)) { outputFile.mkdirs(); - if (!outputFile.exists()) + if (!outputFile.isDirectory()) throw failedWrite(new IOException(NLS.bind(Messages.sar_failedMkdir, outputFile.toString()))); target = new ZippedFolderOutputStream(outputFile); } else { - // file based0 + // file based File parent = outputFile.getParentFile(); - if (!parent.exists() && !parent.mkdirs()) + parent.mkdirs(); + if (!parent.isDirectory()) throw failedWrite(new IOException(NLS.bind(Messages.sar_failedMkdir, parent.toString()))); //$NON-NLS-1$ target = new FileOutputStream(file); } -- cgit v1.2.3