Skip to content

Commit

Permalink
[monkeydoc] Close FileStream early in when adding man pages.
Browse files Browse the repository at this point in the history
  • Loading branch information
garuma committed Dec 20, 2012
1 parent ba09292 commit ccb7307
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mcs/tools/monkeydoc/MonkeyDoc/providers/man-provider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ public override void PopulateTree (Tree tree)
nodeToAddChildrenTo.CreateNode (name.Value, target);

if (File.Exists (page.Value))
storage.Store (name.Value, File.OpenRead (page.Value));
using (var file = File.OpenRead (page.Value))
storage.Store (name.Value, file);
}
}
}
Expand Down

0 comments on commit ccb7307

Please sign in to comment.