Skip to content

The trace file DB cannot be deleted under Windows OS #47

@maestrosoft

Description

@maestrosoft

The TlmRecorder::openDB(const std::string& dbName) function does create the ifstream object with the file name: std::ifstream f(dbName.c_str()); Then check if the file exists with if (f.good()). So far so good however remove(dbName.c_str()) always fails to delete the file under Windows. It seems internally Windows does open the file when f.good() is called. Then the remove call will fail with a shared violation status. To fix the issue f.close() must be called before the remove call.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions