Browse Source

Fixed crash when overwriting binary files while creating a new project.

http://community.sharpdevelop.net/forums/t/15626.aspx
pull/6/merge
Daniel Grunwald 13 years ago
parent
commit
6921b3ed90
  1. 2
      src/Main/Base/Project/Src/Internal/Templates/Project/ProjectDescriptor.cs

2
src/Main/Base/Project/Src/Internal/Templates/Project/ProjectDescriptor.cs

@ -369,7 +369,7 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates
} }
if (!String.IsNullOrEmpty(file.BinaryFileName)) { if (!String.IsNullOrEmpty(file.BinaryFileName)) {
// Binary content // Binary content
File.Copy(file.BinaryFileName,fileName); File.Copy(file.BinaryFileName, fileName, true);
} else { } else {
// Textual content // Textual content
StreamWriter sr = new StreamWriter(File.Create(fileName), ParserService.DefaultFileEncoding); StreamWriter sr = new StreamWriter(File.Create(fileName), ParserService.DefaultFileEncoding);

Loading…
Cancel
Save