This is an automated email from the ASF dual-hosted git repository.

SbloodyS pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new 3df9640c80 [Fix-18636][UI] Fix resource validation rejecting files 
whose directory name shares a prefix with a sibling (#18637)
3df9640c80 is described below

commit 3df9640c8073063ddc1c8ed2cf5a69cc11017637
Author: huangrunxing <[email protected]>
AuthorDate: Fri Sep 18 11:35:39 2026 +0800

    [Fix-18636][UI] Fix resource validation rejecting files whose directory 
name shares a prefix with a sibling (#18637)
    
    Co-authored-by: fuchanghai <[email protected]>
---
 .../src/views/projects/task/components/node/fields/use-resources.ts  | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-resources.ts
 
b/dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-resources.ts
index ae9020534a..b77e8f0a76 100644
--- 
a/dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-resources.ts
+++ 
b/dolphinscheduler-ui/src/views/projects/task/components/node/fields/use-resources.ts
@@ -68,7 +68,10 @@ export function useResources(
     resources: ResourceOption[]
   ): boolean => {
     const isDirectory = (res: ResourceOption): boolean => {
-      return res.dirctory && new RegExp(`^${res.fullName}`).test(fullName)
+      return (
+        res.dirctory &&
+        (fullName === res.fullName || fullName.startsWith(`${res.fullName}/`))
+      )
     }
 
     const processDirectory = (res: ResourceOption): boolean => {

Reply via email to