wolfboys commented on code in PR #2948:
URL:
https://github.com/apache/incubator-streampark/pull/2948#discussion_r1296565942
##########
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ResourceServiceImpl.java:
##########
@@ -204,13 +205,18 @@ public void deleteResource(Resource resource) {
Resource findResource = getById(resource.getId());
checkOrElseAlert(findResource);
- FsOperator.lfs()
- .delete(
- String.format(
- "%s/%d/%s",
- Workspace.local().APP_UPLOADS(),
- findResource.getTeamId(),
- findResource.getResourceName()));
+ String filePath =
+ String.format(
+ "%s/%d/%s",
+ Workspace.local().APP_UPLOADS(),
+ findResource.getTeamId(),
+ findResource.getResourceName());
+
+ if (!new File(filePath).exists() &&
StringUtils.isNotBlank(findResource.getFilePath())) {
Review Comment:
We better use FilesUtils.exists(path...)
--
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]