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

Complete the switch to use system.temp_dir instead of temp_path for WSS

See issue #648 for details.
parent c5dd98bf
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
......@@ -12,7 +12,7 @@ function getAddress() {
*
* There's a very slim chance of false positives here, but whatever.
*/
const f = new File(system.temp_path + 'sbbs-ws-' + client.socket.remote_port + '.ip');
const f = new File(system.temp_dir + 'sbbs-ws-' + client.socket.remote_port + '.ip');
if (!f.exists) return;
if (f.date < client.connect_time) return; // Avoid stale ws ip files
if (f.date - client.connect_time > 5) return; // Avoid ws ip files probably not belonging to this user (5 seconds arbitrary)
......
......@@ -41,7 +41,7 @@ function uReplace(str) {
function getCacheName(url, addr) {
const cfn = format('wttr.in_%s%s.ans', url, addr || '').replace(/[^0-9a-z\.]+/ig, '_');
return system.temp_path + cfn;
return system.temp_dir + cfn;
}
function readCache(url, addr, ttl) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment