Ondrashek
Ondrashek

Reputation: 139

Directory.Delete close program without Extension

I have a little problem. I did a program (WinForms C#) which copy files from disk to removable media.

This is my process in loop:

Structure of unzipped *.exe

My code:

foreach(string[] dir in listView1.SelectedItems)
{
 if(Directory.Exists(Path.Combine(path_to_source, dir))
 {
   Directory.Delete(Path.Combine(path_to_source, dir), true);
 }
} 

The question is: Why program close and delete himself when Directory.Delete begin.

Upvotes: -1

Views: 82

Answers (1)

Ondrashek
Ondrashek

Reputation: 139

Trendmicro antivirus is the problem.

Upvotes: 0

Related Questions