Skip to content

Overwriting the hosts file #1

@anteskoric

Description

@anteskoric

If the user tries to unblock a website a FileNotFoundException will be thrown.
This Exception is thrown in the method saveIntoHosts that is called from the BlockedAndUnblockController.
The problem occurs when we try to set the append parameter of the FileWriter constructor to false, if append is set to true the method will not throw a Exception but the bytes will be written to the end of the file, but that is not the wanted result. The wanted result is to overwrite the whole file, this is possible only if append is set to false.

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