Commit 1e62752a authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

Restore ability for to open an arbitrary SMB msgbase

Before commit 5da26eca, you could pass Msgbase() the path to an SMB
on the disk and open() it, no configuration needed. As of 2 years
ago, I broke that, and passing a path to an SMB would open the "mail" base
instead - most unexpected. This is a feature of smb_open_sub() which we
switched to using (from smb_open()), so go back to using smb_open() when
an unrecognized code is pass to the constructor.

This has the negative consequence that the "mail" base can't be created
via JS. Probably should fix that.
parent 6b36b379
......@@ -93,7 +93,11 @@ js_open(JSContext *cx, uintN argc, jsval *arglist)
if((p->smb_result = smb_open_sub(scfg, &(p->smb), p->smb.subnum)) != SMB_SUCCESS) {
if(p->smb.subnum == INVALID_SUB)
p->smb_result = smb_open(&(p->smb));
p->smb_result = smb_open_sub(scfg, &(p->smb), p->smb.subnum);
if(p->smb_result != SMB_SUCCESS) {
return JS_TRUE;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment