Skip to content
Snippets Groups Projects
Commit 7ecb2ba8 authored by BlackOverlord's avatar BlackOverlord
Browse files

close file on exception

parent 6775c12f
No related branches found
Tags 1.0.5
No related merge requests found
......@@ -82,11 +82,14 @@ public class ShellLink {
}
public ShellLink(InputStream in) throws IOException, ShellLinkException {
this(new ByteReader(in));
in.close();
try {
Parse(new ByteReader(in));
} finally {
in.close();
}
}
private ShellLink(ByteReader data) throws ShellLinkException, IOException {
private void Parse(ByteReader data) throws ShellLinkException, IOException {
header = new ShellLinkHeader(data);
LinkFlags lf = header.getLinkFlags();
if (lf.hasLinkTargetIDList())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment