s3 ext setStorage() does nothing for directoryCreate

Description

when directoryCreate calls setStorage with the s3 v2 extension, it does nothing but update the value

https://github.com/lucee/Lucee/blob/6.0/core/src/main/java/lucee/runtime/tag/Directory.java#L726

public static void setS3Attrs(PageContext pc, Resource res, Object acl, String storage) throws PageException { String scheme = res.getResourceProvider().getScheme(); if ("s3".equalsIgnoreCase(scheme)) { // ACL if (acl != null) { try { // old way BIF bif = CFMLEngineFactory.getInstance().getClassUtil().loadBIF(pc, "StoreSetACL"); bif.invoke(pc, new Object[] { res.getAbsolutePath(), acl }); } catch (Exception e) { throw Caster.toPageException(e); } } // STORAGE if (storage != null) { Reflector.callMethod(res, "setStorage", new Object[] { storage }); } } }

test case https://github.com/lucee/Lucee/pull/2147

Environment

None

Attachments

1
  • 14 Jul 2023, 12:01 pm

Activity

Show:

Pothys - MitrahSoft 19 July 2023 at 15:33

I checked this issue with lucee versions 6.0.0.514-SNAPSHOT and 5.4.2.11-SNAPSHOT. Now the s3 ext setStorage() argument works fine on directory create and the issue was solved.

Zac Spitzer 14 July 2023 at 13:03

Zac Spitzer 14 July 2023 at 12:01
Edited

you can’t update a bucket’s region before creation, so i have split that function into two smaller functions

Fixed

Details

Assignee

Reporter

Priority

Fix versions

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Sprint

Created 14 July 2023 at 11:14
Updated 21 July 2023 at 06:36
Resolved 21 July 2023 at 06:36

Flag notifications