Spaces:
Running
Running
Commit
·
09e13bb
1
Parent(s):
8b08965
delaying mirroring to when omnitool is ready (2)
Browse files- hf_server.js +2 -29
hf_server.js
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* All rights reserved.
|
4 |
*/
|
5 |
//@ts-check
|
6 |
-
const VERSION = '0.6.0.hf.014.
|
7 |
|
8 |
const express = require('express');
|
9 |
const http = require('http');
|
@@ -491,34 +491,7 @@ async function main(app)
|
|
491 |
{
|
492 |
if (fs.existsSync(targetDir)) {
|
493 |
fsExtra.copySync(targetDir, sourceDir);
|
494 |
-
|
495 |
-
ignored: /[\/\\]\./,
|
496 |
-
persistent: true
|
497 |
-
});
|
498 |
-
/*
|
499 |
-
watcher
|
500 |
-
.on('add', function(path) {
|
501 |
-
const targetFile = path.replace(sourceDir, targetDir);
|
502 |
-
fs.copyFile(path, targetFile, (err) => {
|
503 |
-
if (err) throw err;
|
504 |
-
console.log('File', path, 'has been added and copied to', targetFile);
|
505 |
-
});
|
506 |
-
})
|
507 |
-
.on('change', function(path) {
|
508 |
-
const targetFile = path.replace(sourceDir, targetDir);
|
509 |
-
fs.copyFile(path, targetFile, (err) => {
|
510 |
-
if (err) throw err;
|
511 |
-
console.log('File', path, 'has been changed and copied to', targetFile);
|
512 |
-
});
|
513 |
-
})
|
514 |
-
.on('unlink', function(path) {
|
515 |
-
const targetFile = path.replace(sourceDir, targetDir);
|
516 |
-
fs.unlink(targetFile, (err) => {
|
517 |
-
if (err) throw err;
|
518 |
-
console.log('File', path, 'has been removed');
|
519 |
-
});
|
520 |
-
});
|
521 |
-
*/
|
522 |
}
|
523 |
|
524 |
await checkOmnitoolStatus();
|
|
|
3 |
* All rights reserved.
|
4 |
*/
|
5 |
//@ts-check
|
6 |
+
const VERSION = '0.6.0.hf.014.e';
|
7 |
|
8 |
const express = require('express');
|
9 |
const http = require('http');
|
|
|
491 |
{
|
492 |
if (fs.existsSync(targetDir)) {
|
493 |
fsExtra.copySync(targetDir, sourceDir);
|
494 |
+
console.log('Copied files from', targetDir, 'to', sourceDir);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
495 |
}
|
496 |
|
497 |
await checkOmnitoolStatus();
|