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
This commit is contained in:
Marcus Sorensen 2013-01-28 09:22:56 -07:00
parent afd7de7e33
commit fe9398dc73
1 changed files with 2 additions and 1 deletions

View File

@ -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