From 2eb90776e1b0c1845d21c516fd4da314d23f7be3 Mon Sep 17 00:00:00 2001 From: Rob Swindell <rob@synchro.net> Date: Sun, 18 Apr 2021 15:42:44 -0700 Subject: [PATCH] remove() method needs to read message header (not just index) Or else it fails with the following base error: !smb_putmsghdr illegal header length increase: 70 (1 blocks, 0 hfields, 0 dfields) vs 0 (0 blocks) --- src/sbbs3/js_filebase.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sbbs3/js_filebase.c b/src/sbbs3/js_filebase.c index 57414143df..ed415a7ac0 100644 --- a/src/sbbs3/js_filebase.c +++ b/src/sbbs3/js_filebase.c @@ -1219,7 +1219,7 @@ js_remove_file(JSContext *cx, uintN argc, jsval *arglist) JSBool result = JS_TRUE; rc=JS_SUSPENDREQUEST(cx); file_t file; - if((p->smb_result = smb_loadfile(&p->smb, fname, &file, file_detail_index)) == SMB_SUCCESS) { + if((p->smb_result = smb_loadfile(&p->smb, fname, &file, file_detail_normal)) == SMB_SUCCESS) { char path[MAX_PATH + 1]; if(delfile && remove(getfilepath(scfg, &file, path)) != 0) { JS_ReportError(cx, "%d removing '%s'", errno, path); @@ -1452,7 +1452,7 @@ static jsSyncMethodSpec js_filebase_functions[] = { {"get_names", js_get_file_names, 3, JSTYPE_ARRAY ,JSDOCSTR("[filespec] [,since-time=0] [,sort=true [,order]]") ,JSDOCSTR("get a list of index-formatted (e.g. shortened) filenames (strings) from file base index" - ", the default sort order is the sysop-configured order or <tt>FileBase.SORT.NAME_A</tt>") + ", the default sort order is the sysop-configured order or <tt>FileBase.SORT.NAME_AI</tt>") ,31900 }, {"get_path", js_get_file_path, 1, JSTYPE_STRING -- GitLab