[Kimchi-devel] [PATCH] : Dir Storagepool path: Git hub issue:316
Pradeep K Surisetty
psuriset at linux.vnet.ibm.com
Wed Feb 12 14:03:14 UTC 2014
Defining a New DIR based Storage Pool fails, if user appends "/" to path.
For ex: If user use "/home/user/vms/" instead of "/home/user/vms", it fails with " Not a valid linux path"
Issue: https://github.com/kimchi-project/kimchi/issues/316
Signed-off-by: Chandan Kumar<psuriset at linux.vnet.ibm.com>
Reviewed-by: Pradeep K Surisetty <psuriset at 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 e5922b3..a5a12f7 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(i18n['msg.pool.edit.path.blank']);
return false;
}
- if (!/((\/([0-9a-zA-Z-_\.]+)))$/.test(path)) {
+ if (!/((\/([0-9a-zA-Z-_\.]+)))(\/|[0-9a-zA-Z-_\.])$/.test(path)) {
kimchi.message.error(i18n['msg.validate.pool.edit.path']);
return false;
}
--
1.8.3.1
More information about the Kimchi-devel
mailing list