1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

Added automatic clipboard.

This commit is contained in:
Ylian Saint-Hilaire 2021-06-14 18:46:01 -07:00
parent 5e7669e6d8
commit d8fa07941d
2 changed files with 21 additions and 3 deletions

View file

@ -1400,6 +1400,7 @@ function serverFetchFile() {
if ((Object.keys(agentFileHttpRequests).length > 4) || (agentFileHttpPendingRequests.length == 0)) return; // No more than 4 active HTTPS requests to the server.
var data = agentFileHttpPendingRequests.shift();
if ((data.overwrite !== true) && fs.existsSync(data.path)) return; // Don't overwrite an existing file.
//try { fs.unlinkSync(data.path); } catch (ex) { } // Remove the old file.
if (data.createFolder) { try { fs.mkdirSync(data.folder); } catch (ex) { } } // If requested, create the local folder.
data.url = 'http' + getServerTargetUrlEx('*/').substring(2);
var agentFileHttpOptions = http.parseUri(data.url);