From c7e27a836abe702a977ab7c51cf04cabcfa9d701 Mon Sep 17 00:00:00 2001 From: Denis Flaven Date: Thu, 28 Jul 2011 13:45:51 +0000 Subject: [PATCH] Make sure that the root URL ends with a slash SVN:trunk[1380] --- setup/setup.js | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/setup/setup.js b/setup/setup.js index 9939a5248..4cc05b044 100644 --- a/setup/setup.js +++ b/setup/setup.js @@ -113,11 +113,22 @@ function DoSubmit(sMsg, iStep) else { var bMatch = appPath.match(/^http(?:s)?\:\/\//); - if (!bMatch) - { - alert('"'+appPath+'" does not look like a valid URL for the application...\nPlease check your input.'); - bResult = false; - } + if (!bMatch) + { + alert('"'+appPath+'" does not look like a valid URL for the application...\nPlease check your input.'); + bResult = false; + } + else + { + // Make sure that the root URL ends with a slash + var bMatch = appPath.match(/\/$/); + if (!bMatch) + { + // If not, add a slash at the end + appPath += '/'; + $('#application_path').val(appPath); + } + } } break;