Closed yakirzana closed 2 years ago
Hi,
https://github.com/rogerc/file-stream-rotator/blob/d48e1ec847bd27bc7896462d0e56ba19f07c581e/FileStreamRotator.js#L483
It is not working correctly if the file name contains a directory.
const path = require('path'); const directory = "dir"; const name = "file.ext"; const nameWithNumber = "file.ext.2"; const fullPath = path.join(directory, name); const FullNameWithNumber =path.join(directory, nameWithNumber); console.log(FullNameWithNumber.match(fullPath)) /// null console.log(nameWithNumber.match(name)) /// value
if running under Windows, this might cause an issue. This will be corrected in the next major release in the coming months.
Hi,
https://github.com/rogerc/file-stream-rotator/blob/d48e1ec847bd27bc7896462d0e56ba19f07c581e/FileStreamRotator.js#L483
It is not working correctly if the file name contains a directory.