diff --git a/agents/meshcore.js b/agents/meshcore.js index a3abb688..9a4c3d9a 100644 --- a/agents/meshcore.js +++ b/agents/meshcore.js @@ -2218,6 +2218,21 @@ function createMeshCore(agent) { try { fs.renameSync(oldfullpath, newfullpath); } catch (e) { console.log(e); } break; } + case 'findfile': { + // Search for files + var r = require('file-search').find(cmd.path, cmd.filter); + r.socket = this; + r.socket.reqid = cmd.reqid; // Search request id. This is used to send responses and cancel the request. + r.socket.path = cmd.path; // Search path + r.on('result', function (str) { try { this.socket.write(Buffer.from(JSON.stringify({ action: 'findfile', r: str.substring(this.socket.path.length), reqid: this.socket.reqid }))); } catch (ex) { } }); + r.then(function () { try { this.socket.write(Buffer.from(JSON.stringify({ action: 'findfile', r: null, reqid: this.socket.reqid }))); } catch (ex) { } }); + break; + } + case 'cancelfindfile': { + // TODO: Cancel a search for files + // cmd.reqid <-- Cancel this reqid + sendConsoleText('cancelfindfile: ' + cmd.reqid); + } case 'download': { // Download a file var sendNextBlock = 0; diff --git a/emails/translations/account-check_fr.html b/emails/translations/account-check_fr.html index c7e44af7..82d7beff 100644 --- a/emails/translations/account-check_fr.html +++ b/emails/translations/account-check_fr.html @@ -11,5 +11,5 @@
- Si vous n'avez pas initié cette demande, veuillez ignorer cet e-mail. + Si vous n'avez pas initié cette demande, veuillez ignorer ce courrier.