Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTFTree's LoadRtfFile method does not release file when it fails. #22

Open
yong24s opened this issue Jul 11, 2017 · 0 comments
Open

RTFTree's LoadRtfFile method does not release file when it fails. #22

yong24s opened this issue Jul 11, 2017 · 0 comments

Comments

@yong24s
Copy link

yong24s commented Jul 11, 2017

To replicate, supply LoadRtfFile() a path to an invalid or corrupted RTF file.

Notice that, File.Move will throw an exception as the file is still being used by RTFTree.

There is no remedy as RTFTree is not an IDisposable.

Code snippet as follows:

RtfTree tree = new RtfTree();
try  #{
       tree.LoadRtfFile(pathToRtfFile);
} catch (System.Exception ex) {
}

File.Move(pathToRtfFile, pathToNewLocation);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant