Ver Fonte

HUE-2124 [oozie] HDFS Deployment directory is missing "slash" symbol

Added leading slash on workflow creation
Enrico Berti há 11 anos atrás
pai
commit
4b4f63f
1 ficheiros alterados com 3 adições e 2 exclusões
  1. 3 2
      apps/oozie/src/oozie/templates/utils.inc.mako

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

@@ -390,8 +390,9 @@
         }
 
         function handleChoice(filePath) {
-          if (filePath.indexOf("${ workflow.deployment_dir }") > -1) {
-            filePath = filePath.substring("${ workflow.deployment_dir }".length + 1);
+          var _deployDir = $.trim("${ workflow.deployment_dir }");
+          if (_deployDir != "" && filePath.indexOf(_deployDir) > -1) {
+            filePath = filePath.substring(_deployDir.length + 1);
             if (filePath == "") {
               filePath = "./";
             }