Browse Source

Fixed a possible cause for SD2-1640 - DirectoryNotFoundException when adding source file

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5679 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
pull/1/head
Daniel Grunwald 16 years ago
parent
commit
fcaaa81a70
  1. 4
      src/Main/Base/Project/Src/Services/File/OpenedFile.cs

4
src/Main/Base/Project/Src/Services/File/OpenedFile.cs

@ -285,7 +285,9 @@ namespace ICSharpCode.SharpDevelop @@ -285,7 +285,9 @@ namespace ICSharpCode.SharpDevelop
Properties memento = GetMemento(newView);
using (Stream sourceStream = OpenRead()) {
currentView = newView;
fileData = null;
// don't reset fileData if the file is untitled, because OpenRead() wouldn't be able to read it otherwise
if (this.IsUntitled == false)
fileData = null;
newView.Load(this, sourceStream);
}
RestoreMemento(newView, memento);

Loading…
Cancel
Save