[pve-devel] [PATCH manager] fix #2810: don't add options multiple times to features property

Oguz Bektas o.bektas at proxmox.com
Mon Jun 22 13:54:40 CEST 2020


instead of unconditionally pushing to the 'mounts' array we need to check
if we already have the option in there. without this, we get config
options like:

features: nfs;nfs;nfs

Signed-off-by: Oguz Bektas <o.bektas at proxmox.com>
---
 www/manager6/lxc/FeaturesEdit.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/manager6/lxc/FeaturesEdit.js b/www/manager6/lxc/FeaturesEdit.js
index 1275a2e0..63a9a2a9 100644
--- a/www/manager6/lxc/FeaturesEdit.js
+++ b/www/manager6/lxc/FeaturesEdit.js
@@ -72,7 +72,7 @@ Ext.define('PVE.lxc.FeaturesInputPanel', {
 	var me = this;
 	var mounts = me.mounts;
 	me.fstypes.forEach(function(fs) {
-	    if (values[fs]) {
+	    if (values[fs] && !mounts.includes(fs)) {
 		mounts.push(fs);
 	    }
 	    delete values[fs];
-- 
2.20.1




More information about the pve-devel mailing list