Permalink
Browse files

[monkeydoc] Close FileStream early in when adding man pages.

  • Loading branch information...
garuma committed Dec 20, 2012
1 parent ba09292 commit ccb7307408fff24fc1d58826bdda0ec2d3f5c0f4
Showing with 2 additions and 1 deletion.
  1. +2 −1 mcs/tools/monkeydoc/MonkeyDoc/providers/man-provider.cs
@@ -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);
}
}
}

0 comments on commit ccb7307

Please sign in to comment.