Prechádzať zdrojové kódy

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

Fix for relative paths
Enrico Berti 13 rokov pred
rodič
commit
cfee9cc48c

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

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