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:47:52 GMT
reptillicus commented on this pull request.



>        try {
-         File containerFile = openFolder(container);
-         File[] children = containerFile.listFiles();
-         if (null != children) {
-            for (File child : children)
-               if (options.isRecursive() || child.isFile()) {
-                  Utils.deleteRecursively(child);
+         File object = new File(basePath);
+         if (object.isFile()) {
+            // To mimic the S3 type blobstores, a prefix for an object blob
+            // should also get deleted
+            delete(object);
+         }
+         else if (object.isDirectory() & (optsPrefix.endsWith(File.separator) | isNullOrEmpty(optsPrefix)))
{

fixed

-- 
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_r245169284
Mime
View raw message