From 783851099b43236666b2fc0cc866834773d6e7b7 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 2 Nov 2005 01:04:00 +0000 Subject: r11458: fixed our ejs smbscript interfaces to use arrays where appropriate. In js arrays are a special type of object where the length property is automatic, and cannot be modified manually. Our code was manually setting length, which made it abort when someone passed in a real ejs array. To fix this we need to create real arrays instead of objects, and remove the code that manually sets the length (This used to be commit ebdd1393fde44a0a35446d1a922d29a7c1769ba7) --- source4/scripting/bin/winreg | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'source4/scripting/bin') diff --git a/source4/scripting/bin/winreg b/source4/scripting/bin/winreg index ac6f9e61ba..2114394f45 100755 --- a/source4/scripting/bin/winreg +++ b/source4/scripting/bin/winreg @@ -61,13 +61,15 @@ function list_values(path) { } function list_path(path) { + var count = 0; var list = reg.enum_path(path); if (list == undefined) { println("Unable to list " + path); - return; + return 0; } var i; list_values(path); + count = count + list.length; for (i=0;i