Skip to content

Possible to reformat a disk that has a Linux fs on it #104

@msau42

Description

@msau42

What happened:
The implementation of IsVolumeFormatted only checks for ntfs filesystem, and it returns false if it doesn't find ntfs. That means it returns unformatted if there's a linux filesystem on it, and then subsequently calling FormatVolume can override the filesystem.

More discussion in https://app.slack.com/client/T09NY5SBT/CN5JCCW31/thread/C8EJ01Z46-1603793388.212200

What you expected to happen:
Format should error if a filesystem is already on the disk.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions