Procházet zdrojové kódy

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

Fix for relative paths
Enrico Berti před 13 roky
rodič
revize
cfee9cc48c
1 změnil soubory, kde provedl 2 přidání a 3 odebrání
  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();