Odd behavior with limit
const result = findRemoveSync(process.env.LOG_BASE_DIR, {
age: { seconds: process.env.SECONDS_TO_RETAIN_LOG_FILES },
extensions: ".log",
limit: 100
});
the base dir has multiple directories under it and the log files are under those. If I have counted right there are around 94 files scattered amongst sub-folders, all *.log, definitely not many more than 100 if at all. All old than the 20s set and it seems to take 2 goes to delete all the files.
I have checked around to see that none of the files are open anywhere. Is there anything else that I may be doing wrong that may be causing this? What is the behavior if it fails to delete one file, will it still go on to delete the others?
Thanks
Thanks for bringing this to my attention.
Busy family father here. If you could fork this repository, display this problem in a new failing unit test case, that would be great :)
I think we already have some unit tests toward the end covering some deeply, nested random files. Have a look. I hope this helps.