main: cache remote-saving regexp

This commit is contained in:
jean-emmanuel 2019-01-05 11:29:33 +01:00
parent 28ed28ab2d
commit 4fcf539a68
2 changed files with 2 additions and 2 deletions

View file

@ -116,7 +116,7 @@ module.exports = {
sessionSetPath: function(data, clientId) {
if (settings.read('remoteSaving') && !RegExp(settings.read('remoteSaving')).test(ipc.clients[clientId].address)) {
if (settings.read('remoteSaving') && settings.read('remoteSaving').test(ipc.clients[clientId].address)) {
return
}

View file

@ -73,7 +73,7 @@ var makeDefaultConfig = function(argv){
urlOptions: argv['url-options'] ? '?' + argv['url-options'].join('&') : '',
noVsync: argv['disable-vsync'] || false,
noGpu: argv['disable-gpu'] || false,
readOnly: argv['read-only'] || false,
readOnly: argv['read-only'] ? RegExp(argv['read-only']) : false,
remoteSaving: argv['remote-saving'] || false,
midi: argv['midi'],
stateFile: (function(){