1
0
mirror of https://github.com/NginxProxyManager/nginx-proxy-manager.git synced 2025-10-30 18:05:34 +03:00

404 hosts polish

This commit is contained in:
Jamie Curnow
2025-09-24 19:45:00 +10:00
parent 18537b9288
commit da68fe29ac
10 changed files with 95 additions and 25 deletions

View File

@@ -301,8 +301,11 @@ const internalNginx = {
* @param {String} filename
*/
deleteFile: (filename) => {
logger.debug(`Deleting file: ${filename}`);
if (!fs.existsSync(filename)) {
return;
}
try {
logger.debug(`Deleting file: ${filename}`);
fs.unlinkSync(filename);
} catch (err) {
logger.debug("Could not delete file:", JSON.stringify(err, null, 2));