jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From reptillicus <notificati...@github.com>
Subject Re: [jclouds/jclouds] Fix for FileSystem blob store clearContainer with options (#1258)
Date Thu, 03 Jan 2019 23:48:12 GMT
reptillicus commented on this pull request.



> @@ -254,15 +255,49 @@ public void clearContainer(final String container) {
    public void clearContainer(String container, ListContainerOptions options) {
       filesystemContainerNameValidator.validate(container);
       // TODO: these require calling removeDirectoriesTreeOfBlobKey
-      checkArgument(options.getDir() == null && options.getPrefix() == null, "cannot
specify directory or prefix");
+//      checkArgument(options.getDir() == null && options.getPrefix() == null, "cannot
specify directory or prefix");
+      String optsPrefix;
+      // Pick whichever one is not null? Not sure what to do until inDirectory is deprecated.
+      optsPrefix = options.getDir() == null ? options.getPrefix() : options.getDir();
+      // If both are null, just use an empty string
+      optsPrefix = optsPrefix == null ? "" : optsPrefix;

changed

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1258#discussion_r245169336
Mime
View raw message