incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [30/50] [abbrv] git commit: Summary: Fix S3 from trying to upload directories found in template dirs
Date Wed, 30 Jan 2013 00:06:06 GMT
Summary: Fix S3 from trying to upload directories found in template dirs

Detail: The S3 upload code fails on directories in the templates dir, such as
"KVMHA" that gets created for KVM. This skips directories in the templates dir.

BUG-ID: CLOUDSTACK-1056
Bugfix-for: 4.1 (master)
Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1359390176 -0700


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/fe9398dc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/fe9398dc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/fe9398dc

Branch: refs/heads/ui-quick-view-v2
Commit: fe9398dc7376c334709784989388bfe641e809ba
Parents: afd7de7
Author: Marcus Sorensen <marcus@betterservers.com>
Authored: Mon Jan 28 09:22:56 2013 -0700
Committer: Marcus Sorensen <marcus@betterservers.com>
Committed: Mon Jan 28 09:22:56 2013 -0700

----------------------------------------------------------------------
 .../resource/NfsSecondaryStorageResource.java      |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/fe9398dc/core/src/com/cloud/storage/resource/NfsSecondaryStorageResource.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/storage/resource/NfsSecondaryStorageResource.java b/core/src/com/cloud/storage/resource/NfsSecondaryStorageResource.java
index a4bea9d..a634c68 100755
--- a/core/src/com/cloud/storage/resource/NfsSecondaryStorageResource.java
+++ b/core/src/com/cloud/storage/resource/NfsSecondaryStorageResource.java
@@ -398,7 +398,8 @@ public class NfsSecondaryStorageResource extends ServerResourceBase implements
                         @Override
                         public boolean accept(final File directory,
                                 final String fileName) {
-                            return !fileName.startsWith(".");
+                            File fileToUpload = new File(directory.getAbsolutePath() + "/"
+ fileName);
+                            return !fileName.startsWith(".") && !fileToUpload.isDirectory();
                         }
                     }, new ObjectNamingStrategy() {
                         @Override


Mime
View raw message