Skip to content

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

@yong24s

Description

@yong24s

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions