Skip to content

Commit

Permalink
check if virtual folder
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeloffner committed Oct 4, 2023
1 parent e240287 commit 4509bb2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions source/java/src/org/lucee/extension/resource/s3/S3.java
Original file line number Diff line number Diff line change
Expand Up @@ -2059,6 +2059,10 @@ public void addAccessControlList(String bucketName, String objectName, Object ob
return;
}
catch (AmazonServiceException ise) {
S3Info src = get(bucketName, objectName);
if (src.isVirtual()) {
throw new S3Exception("Cannot set Access Control List to a virtual folder", se);
}
throw toS3Exception(ise);
}
}
Expand Down Expand Up @@ -2104,6 +2108,11 @@ public void setAccessControlList(AmazonS3Client client, String bucketName, Strin
return;
}
catch (AmazonServiceException ise) {
S3Info src = get(bucketName, objectName);
if (src.isVirtual()) {
throw new S3Exception("Cannot set Access Control List to a virtual folder", se);
}

throw toS3Exception(ise);
}
}
Expand Down

0 comments on commit 4509bb2

Please sign in to comment.