Skip to content

Commit cd6f457

Browse files
committed
feature 16901
1 parent e6cb029 commit cd6f457

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/dto/resources/visitor/ResourceTreeVisitor.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,10 @@ private static ResourceComponent getResourceComponent(StorageEntity resource) {
124124
tempResourceComponent = new FileLeaf();
125125
}
126126

127-
String currentDir = resource.getFullName().split(Constants.RESOURCE_TYPE_FILE)[1].substring(1);
127+
String currentDir = "";
128+
if (resource.getFullName().contains(Constants.RESOURCE_TYPE_FILE)) {
129+
currentDir = resource.getFullName().split(Constants.RESOURCE_TYPE_FILE)[1].substring(1);
130+
}
128131

129132
tempResourceComponent.setName(resource.getFileName());
130133
tempResourceComponent.setFullName(resource.getFullName());

0 commit comments

Comments
 (0)