Преглед изворни кода

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

Fix for relative paths
Enrico Berti пре 13 година
родитељ
комит
cfee9cc
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) {
           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();