From 51134b449d538082bfc0273c7f68b84395854deb Mon Sep 17 00:00:00 2001 From: "Rob Swindell (on Debian Linux)" <rob@synchro.net> Date: Mon, 25 Sep 2023 10:03:38 -0700 Subject: [PATCH] Complete the switch to use system.temp_dir instead of temp_path for WSS See issue #648 for details. --- xtrn/wttr.in/locator.js | 2 +- xtrn/wttr.in/wttr-lib.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xtrn/wttr.in/locator.js b/xtrn/wttr.in/locator.js index 9ee9dc18eb..dfc065aa45 100644 --- a/xtrn/wttr.in/locator.js +++ b/xtrn/wttr.in/locator.js @@ -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) diff --git a/xtrn/wttr.in/wttr-lib.js b/xtrn/wttr.in/wttr-lib.js index 572a284b86..4e25ea1465 100644 --- a/xtrn/wttr.in/wttr-lib.js +++ b/xtrn/wttr.in/wttr-lib.js @@ -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) { -- GitLab