vite_deleteelectron
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
const fs = require('fs-extra');
|
||||
const fs = require('fs').promises;
|
||||
const path = require('path');
|
||||
const logger = require('../logger');
|
||||
|
||||
@@ -40,7 +40,9 @@ const getMonitoringLogs = async (req, res) => {
|
||||
|
||||
for (const source of logSources) {
|
||||
try {
|
||||
if (!(await fs.pathExists(source.path))) {
|
||||
try {
|
||||
await fs.access(source.path);
|
||||
} catch (e) {
|
||||
logger.warn(`Log file not found: ${source.path}`);
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user