FileTarget: Fix continuous archiving bug. by bhaeussermann · Pull Request #1125 · NLog/NLog

Fixes #1124

The bug manifested since we were archiving based on the log file's creation time, but it seems to be caused by a strange anomaly with the Windows file system:
When we archive, the log file is moved to the archive file path. However, when the new log file is created, it ends up having the same creation time of the old log file (which is now archived).

Others have observed this behavior, and it turns out is caused by the Windows NT Tunneling capabilities which is meant to facilitate the safe saving mechanism of MS-DOS programs.

The fix is to manually set the creation time of the file when it is created.