Skip to content
Snippets Groups Projects
Commit 07b42187 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Fix issue with the (new) backup_level option parsing

Error: can't covert options.backup_level to an integer

Default to 10, if not set.
parent efb5c18a
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
......@@ -21,6 +21,8 @@ if(!options)
options = {};
if(!options.max_line_len)
options.max_line_len = 76;
if(options.backup_level === undefined)
options.backup_level = 10;
function automsg()
{
......@@ -63,8 +65,8 @@ function automsg()
if(!console.noyes(bbs.text(AnonymousQ)))
anon = true;
}
if(options.backup_level !== 0)
file_backup(automsg, options.backup_level);
if(typeof options.backup_level == "number")
file_backup(automsg, Number(options.backup_level));
var file = new File(automsg);
if(!file.open("w")) {
alert("Error " + file.error + " opening " + file.name);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment