D
D.D.
Hi,
I made a console application that had to delete some files and
afterwards write to a log file which files were deleted. I wrote an
event that triggers every time a file was deleted so a line could be
written to the logfile.
Now my problem is that when I execute this console application with 2
files to delete there's nothing in my logfile. When I execute the same
application in debug mode with some breakpoints, it fills my logfile
with 2 lines (because 2 files where deleted).
When I test this with a 100 files then in debug mode and real mode it
writes correctly 100 lines to the logfile.
Why there is a difference in firing the delete event in debug mode and
real mode when using a only 2 files? Has it something to do with the
execution speed.
(with 2 files in real mode, the program has already been terminated
before the disk could write to the logfile, or is this event
asynchronous).
If someone could give me a reasonable explanation or a workaround.
greetz.
I made a console application that had to delete some files and
afterwards write to a log file which files were deleted. I wrote an
event that triggers every time a file was deleted so a line could be
written to the logfile.
Now my problem is that when I execute this console application with 2
files to delete there's nothing in my logfile. When I execute the same
application in debug mode with some breakpoints, it fills my logfile
with 2 lines (because 2 files where deleted).
When I test this with a 100 files then in debug mode and real mode it
writes correctly 100 lines to the logfile.
Why there is a difference in firing the delete event in debug mode and
real mode when using a only 2 files? Has it something to do with the
execution speed.
(with 2 files in real mode, the program has already been terminated
before the disk could write to the logfile, or is this event
asynchronous).
If someone could give me a reasonable explanation or a workaround.
greetz.