-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to delete files on Windows #170
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey guys! Seems like the delete_old function is unable to delete retained logs on Windows with these PM2 configs:
{
"apps": [{
"name": "server",
"logDateFormat": "YYYY-MM-DD HH:mm:ss Z",
"errorFile": "./logs/server-err.log",
"outFile": "./logs/server-out.log",
"mergeLogs": true,
"script": "./index.js"
}]
}
The problems appears to be related to this line:
var fileBaseName = file.substr(0, file.length - 4).split('/').pop() + "__";
On my machine the split fails because the path has "" and not "/".
Because of that the following line fails to match the path, and no file is queued for deletion:
if (files[i].indexOf(fileBaseName) >= 0)
The text was updated successfully, but these errors were encountered: