You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by ga...@apache.org on 2018/11/14 22:48:57 UTC
jclouds git commit: Do not allow options in filesystem clearContainer
Repository: jclouds
Updated Branches:
refs/heads/master 896e99df0 -> 1ae735bb7
Do not allow options in filesystem clearContainer
This requires some additional logic to clean up empty directories.
Test regression from 22ce5484a412bc06ef62995675c07e7a85f66bdf.
Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/1ae735bb
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/1ae735bb
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/1ae735bb
Branch: refs/heads/master
Commit: 1ae735bb7d8fa4d512e744f79582477efdfd7f26
Parents: 896e99d
Author: Andrew Gaul <ga...@apache.org>
Authored: Wed Nov 14 14:42:30 2018 -0800
Committer: Andrew Gaul <ga...@apache.org>
Committed: Wed Nov 14 14:42:30 2018 -0800
----------------------------------------------------------------------
.../strategy/internal/FilesystemStorageStrategyImpl.java | 6 +++---
.../integration/FilesystemContainerIntegrationTest.java | 5 +++++
2 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jclouds/blob/1ae735bb/apis/filesystem/src/main/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImpl.java
----------------------------------------------------------------------
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 733b1f0..211cb42 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
@@ -17,6 +17,7 @@
package org.jclouds.filesystem.strategy.internal;
import static com.google.common.base.Charsets.US_ASCII;
+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;
@@ -252,9 +253,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();
http://git-wip-us.apache.org/repos/asf/jclouds/blob/1ae735bb/apis/filesystem/src/test/java/org/jclouds/filesystem/integration/FilesystemContainerIntegrationTest.java
----------------------------------------------------------------------
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 7dfdd3a..c9fee73 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");
+ }
}