You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ml...@apache.org on 2013/01/30 21:55:08 UTC
[18/50] git commit: Summary: Fix S3 from trying to upload directories
found in template dirs
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 <ma...@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/add_remove_nics
Commit: fe9398dc7376c334709784989388bfe641e809ba
Parents: afd7de7
Author: Marcus Sorensen <ma...@betterservers.com>
Authored: Mon Jan 28 09:22:56 2013 -0700
Committer: Marcus Sorensen <ma...@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