We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c856e31 commit 9a3de5eCopy full SHA for 9a3de5e
PatternFileMover/Action/Copy.cs
@@ -7,13 +7,20 @@ internal class Copy : AbstractAction
7
{
8
public bool DoCopy()
9
10
- File.Copy(
11
- this.GetSourcePath(),
12
- this.GetTargetPath() +
13
- Path.DirectorySeparatorChar +
14
- Path.GetFileName(this.GetCurrent().Cells[0].Value.ToString()
15
- )
16
- );
+ try
+ {
+ File.Copy(
+ this.GetSourcePath(),
+ this.GetTargetPath() +
+ Path.DirectorySeparatorChar +
+ Path.GetFileName(this.GetCurrent().Cells[0].Value.ToString()
17
+ )
18
+ );
19
+ }
20
+ catch (IOException)
21
22
+ return false;
23
24
25
return true;
26
}
0 commit comments