plecos / logrotatewin

This is a Windows implementation of the logrotate utility found in Linux platforms. The goal is to use the same command line parameters and files as the Linux version.
GNU General Public License v3.0
120 stars 43 forks source link

A few fixes for you. #10

Closed NormanDunbar closed 7 years ago

NormanDunbar commented 8 years ago

Afternoon "Plecos",

I've installed LogRotateWin on a Windows 7 server here at work, thanks for your efforts, and found a few things that I wasn't happy about:

I've amended the code to fix the above. I think Visual Studio 2012 has regenerated the Strings.Designer.cs file - I didn't change it, but I've included it anyway. (I'm not a C# developer at all so I've no idea what these files are for!)

The removal of invalid characters from the file paths etc occurs once now at the start of the main loop, and this improves response times a bit as it's not continually assigning and reassigning split -> newsplit each time through the loop. There are 35 passes through the loop on my Windows 7 server as there are 35 invalid path characters.

Apologies if the coding standards are not to your liking. I'm a C programmer on Unix (when I have to) as opposed to this new fangled "java-like" stuff on Windows. :-)

Hope This Helps.

By the way, NOTIFEMPTY is listed on the wiki as being an allowed directive, but it's not catered for and gives a warning if used.

Cheers, Norm.