[PATCH] Issue 316: allow dir storage directory path ending with '/'

From: ShaoHe Feng <shaohef@linux.vnet.ibm.com> Allow dir storage directory path ending with '/' issue: https://github.com/kimchi-project/kimchi/issues/316 Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com> --- ui/js/src/kimchi.storagepool_add_main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/js/src/kimchi.storagepool_add_main.js b/ui/js/src/kimchi.storagepool_add_main.js index ac97e1a..b634ca6 100644 --- a/ui/js/src/kimchi.storagepool_add_main.js +++ b/ui/js/src/kimchi.storagepool_add_main.js @@ -167,7 +167,7 @@ kimchi.validateDirForm = function () { kimchi.message.error.code('KCHPOOL6002E'); return false; } - if (!/((\/([0-9a-zA-Z-_\.]+)))$/.test(path)) { + if (!/((\/([0-9a-zA-Z-_\.]+)\/*?))$/.test(path)) { kimchi.message.error.code('KCHAPI6003E'); return false; } -- 1.8.4.2

please ignore this patch. please review mark's patch [Kimchi-devel] [PATCH] Fix directory path validation for 'DIR' type storage pool Thanks. On 02/21/2014 05:37 PM, shaohef@linux.vnet.ibm.com wrote:
From: ShaoHe Feng <shaohef@linux.vnet.ibm.com>
Allow dir storage directory path ending with '/'
issue: https://github.com/kimchi-project/kimchi/issues/316
Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com> --- ui/js/src/kimchi.storagepool_add_main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/js/src/kimchi.storagepool_add_main.js b/ui/js/src/kimchi.storagepool_add_main.js index ac97e1a..b634ca6 100644 --- a/ui/js/src/kimchi.storagepool_add_main.js +++ b/ui/js/src/kimchi.storagepool_add_main.js @@ -167,7 +167,7 @@ kimchi.validateDirForm = function () { kimchi.message.error.code('KCHPOOL6002E'); return false; } - if (!/((\/([0-9a-zA-Z-_\.]+)))$/.test(path)) { + if (!/((\/([0-9a-zA-Z-_\.]+)\/*?))$/.test(path)) { kimchi.message.error.code('KCHAPI6003E'); return false; }
-- Thanks and best regards! Sheldon Feng(冯少合)<shaohef@linux.vnet.ibm.com> IBM Linux Technology Center

On 02/21/2014 06:37 AM, shaohef@linux.vnet.ibm.com wrote:
From: ShaoHe Feng <shaohef@linux.vnet.ibm.com>
Allow dir storage directory path ending with '/'
issue: https://github.com/kimchi-project/kimchi/issues/316
Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com> --- ui/js/src/kimchi.storagepool_add_main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/js/src/kimchi.storagepool_add_main.js b/ui/js/src/kimchi.storagepool_add_main.js index ac97e1a..b634ca6 100644 --- a/ui/js/src/kimchi.storagepool_add_main.js +++ b/ui/js/src/kimchi.storagepool_add_main.js @@ -167,7 +167,7 @@ kimchi.validateDirForm = function () { kimchi.message.error.code('KCHPOOL6002E'); return false; } - if (!/((\/([0-9a-zA-Z-_\.]+)))$/.test(path)) { + if (!/((\/([0-9a-zA-Z-_\.]+)\/*?))$/.test(path)) { kimchi.message.error.code('KCHAPI6003E'); return false; }
The same I commented on: [PATCH] Fix directory path validation for 'DIR' type storage pool This verification is restricting so much the user. I can have any valid path in my system. /aline manera/ /crístian / /?? This verification should be done in backend. For UI, we should only check if the string starts with /
participants (3)
-
Aline Manera
-
shaohef@linux.vnet.ibm.com
-
Sheldon