소스 검색

HUE-889 [oozie] Smarter file chooser in Workflow editor

Fix for relative paths
Enrico Berti 13 년 전
부모
커밋
cfee9cc48c
1개의 변경된 파일2개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 3
      apps/oozie/src/oozie/templates/utils.inc.mako

+ 2 - 3
apps/oozie/src/oozie/templates/utils.inc.mako

@@ -338,14 +338,13 @@
 
 
         function handleChoice(filePath) {
         function handleChoice(filePath) {
           if (filePath.indexOf("${ workflow.deployment_dir }") > -1) {
           if (filePath.indexOf("${ workflow.deployment_dir }") > -1) {
-            filePath = filePath.substring("${ workflow.deployment_dir }".length);
+            filePath = filePath.substring("${ workflow.deployment_dir }".length + 1);
             if (filePath == "") {
             if (filePath == "") {
-              filePath = "/";
+              filePath = "./";
             }
             }
             if (filePath.indexOf("//") == 0){
             if (filePath.indexOf("//") == 0){
               filePath = filePath.substr(1);
               filePath = filePath.substr(1);
             }
             }
-            filePath = "." + filePath;
           }
           }
           inputElement.val(filePath);
           inputElement.val(filePath);
           inputElement.change();
           inputElement.change();