Permalink
Browse files

FilePath.read required for remote builds

  • Loading branch information...
Doug MacEachern
Doug MacEachern committed Jan 21, 2009
1 parent 5ff5c5d commit dc67fd5445a419aaf9e36284ad054f665fff26f8
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/main/java/com/hyperic/hudson/plugin/S3Profile.java
@@ -100,7 +100,7 @@ public void upload(String bucketName,
throw new IOException(filePath + " is a directory");
}
else {
- File file = new File(filePath.getRemote());
+ File file = new File(filePath.getName());
S3Bucket bucket;
try {
bucket = getOrCreateBucket(bucketName);
@@ -110,7 +110,8 @@ public void upload(String bucketName,
try {
S3Object fileObject =
- new S3Object(bucket, file);
+ new S3Object(bucket, file.getName());
+ fileObject.setDataInputStream(filePath.read());
this.s3.putObject(bucket, fileObject);
} catch (Exception e) {
throw new IOException("put " + file + ": " + e);

0 comments on commit dc67fd5

Please sign in to comment.