diff --git a/apis/filesystem/src/main/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImpl.java b/apis/filesystem/src/main/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImpl.java index cf3b81bbed..b51124bc9b 100644 --- a/apis/filesystem/src/main/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImpl.java +++ b/apis/filesystem/src/main/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImpl.java @@ -16,6 +16,7 @@ */ package org.jclouds.filesystem.strategy.internal; +import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Strings.isNullOrEmpty; import static com.google.common.io.BaseEncoding.base16; @@ -248,9 +249,8 @@ public class FilesystemStorageStrategyImpl implements LocalStorageStrategy { @Override public void clearContainer(String container, ListContainerOptions options) { filesystemContainerNameValidator.validate(container); - if (options.getDir() != null) { - container += denormalize("/" + options.getDir()); - } + // TODO: these require calling removeDirectoriesTreeOfBlobKey + checkArgument(options.getDir() == null || options.getPrefix() == null, "cannot specify directory or prefix"); try { File containerFile = openFolder(container); File[] children = containerFile.listFiles(); diff --git a/apis/filesystem/src/test/java/org/jclouds/filesystem/integration/FilesystemContainerIntegrationTest.java b/apis/filesystem/src/test/java/org/jclouds/filesystem/integration/FilesystemContainerIntegrationTest.java index 7dfdd3acf7..c9fee7356a 100644 --- a/apis/filesystem/src/test/java/org/jclouds/filesystem/integration/FilesystemContainerIntegrationTest.java +++ b/apis/filesystem/src/test/java/org/jclouds/filesystem/integration/FilesystemContainerIntegrationTest.java @@ -193,4 +193,9 @@ public class FilesystemContainerIntegrationTest extends BaseContainerIntegration public void testSetContainerAccess() throws Exception { throw new SkipException("filesystem does not support anonymous access"); } + + @Override + public void testClearWithOptions() throws InterruptedException { + throw new SkipException("filesystem does not support clear with options"); + } }