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

Merge branch 'fix_usersettings_sig' into 'master'

Fix signature using wrong filename

See merge request !391
parents a643f119 0fe4894c
No related branches found
No related tags found
1 merge request!391Fix signature using wrong filename
Pipeline #5469 passed
......@@ -223,7 +223,7 @@ var main_cfg = cfglib.read("main.ini");
var thisuser = new User(argv[0] || user.number);
const userSigFilename = system.data_dir + "user" + format("%04d.sig", thisuser.number);
const userSigFilename = system.data_dir + "user/" + format("%04d.sig", thisuser.number);
const PETSCII_DELETE = '\x14';
const PETSCII_UPPERLOWER = 0x1d;
......
  • Developer

    @rswindell Will this work on Windows? Windows uses backslashes (\) to separate directories. I thought it would be standard practice to use backslash() to ensure the path has the correct slash in it?

    Edited by Eric Oulashin
  • Author Owner

    Forward slash works just fine in Windows. See exec/*.js for plenty of examples of this use.

    A backslash is only important when the path might be passed to external program, and that conversion happens automatically by Synchronet, when necessary (and only on Windows).

    So use a forward slash in paths.

  • Developer

    Is there a reason to use backslash() then? Is backslash() deprecated?

  • Author Owner

    backslash() is for appending a slash or backslash on the end of a string when you're going to possibly pass that string onto an OS path interpreter (e.g. command.com, cmd.exe) where it then matters if it's a backward or forward slash (on Windows).

    backslash() is not deprecated is sometimes necessary, like I said, when you're passing the resulting string on to an external program.

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment