From f776273d5ed29b100265b54cd167d1aab9e621df Mon Sep 17 00:00:00 2001
From: rswindell <>
Date: Fri, 17 Aug 2018 15:50:27 +0000
Subject: [PATCH] get() will now return the 'deflt' arg value (e.g. undefined)
 rather than false if the .ini file can't be opened (e.g. doesn't exist).
 set() will now return the result of File.iniSetValue() rather than the result
 of File.close().

---
 exec/load/userprops.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/exec/load/userprops.js b/exec/load/userprops.js
index 6cade90e54..a4cd656edf 100644
--- a/exec/load/userprops.js
+++ b/exec/load/userprops.js
@@ -11,7 +11,7 @@ function get(section, key, deflt, usernum)
 		usernum = user.number;
 	var file = new File(filename(usernum));
 	if(!file.open('r'))
-		return false;
+		return deflt;
 	var result;
 	if(!section)
 		result = file.iniGetAllObjects();
@@ -30,8 +30,9 @@ function set(section, key, value, usernum)
 	var file = new File(filename(usernum));
 	if(!file.open(file.exists ? 'r+':'w+'))
 		return false;
-	file.iniSetValue(section, key, value);
+	var result = file.iniSetValue(section, key, value);
 	file.close();
+	return result;
 }
 
 this;
-- 
GitLab