github-actions[bot] commented on issue #17177: URL: https://github.com/apache/dolphinscheduler/issues/17177#issuecomment-2876550901
### Search before asking - [x] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened ds configure cos as the resource backend. After uploading files and creating folders, you can see that the creation has been successfully done on cos > Ds configures cos as the resource backend. After uploading files and creating folders, you can see on cos that it has been successfully created.  But it still shows empty on ds > But it still shows as empty on ds  The reason is that transformCOSKeyToAbsolutePath will remove the last `/`. I don't understand why I should do this, but the cos API requires the last `/` to have `/`. > The reason for this is that `transformCOSKeyToAbsolutePath ` removes the last `/`, I don't understand why this is necessary at the moment, but the cos API requires a `/` in the last place for it to work.  After modifying the following code, you can recover > Modify the following code to restore ``` if (!path.endsWith(File.separator)) { path = path + File.separator; } String resourceAbsolutePath = path; ``` But there will be another problem like this, that is, the folder will not be displayed. The reason is that only `result.getObjectSummaries()` is called. This will get the file list of the current directory, but the folder information is in `result.getCommonPrefixes()` Need to add the following code > But there will be another problem in this way, that is, the folder will not be displayed, the reason is that currently only'result. getObjectSummaries()'this will get a list of files in the current directory, but the folder information is in'result. Inside getCommonPrefixes()` Need to make up the following code ``` result.getCommonPrefixes() .stream() .filter(x->!resourceAbsolutePath.equals(x)) .map(key -> { ObjectMetadata metadata = new ObjectMetadata(); COSObject object = new COSObject(); object.setObjectMetadata(metadata); object.setKey(key); return transformCOSObjectToStorageEntity(object); }).collect(Collectors.toList()) ``` Then it will be normal > This will be followed by a normal  ### What you expected to happen 0 ### How to reproduce 0 ### Anything else _No response_ ### Version dev ### Are you willing to submit PR? - [x] Yes I am willing to submit a PR! ### Code of Conduct - [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
