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

doesn't disallow wiping of ssd #4

Open
GuiTaek opened this issue Jan 14, 2023 · 1 comment
Open

doesn't disallow wiping of ssd #4

GuiTaek opened this issue Jan 14, 2023 · 1 comment

Comments

@GuiTaek
Copy link

GuiTaek commented Jan 14, 2023

Hi, I just created the issue. The code change is ready, every path of the tool leads to this function ssd_checker.is_ssd(). Unfortunately, for all of my usb flash drives, this function shows a "False" which is wrong, isn't it? Next time I find time, I'm going to try to find a tool to detect if it's a flash drive, if you don't have an idea to do it better.

@r3nt0n
Copy link
Owner

r3nt0n commented Jan 16, 2023

Awesome!

Maybe just before this line could be a great point to insert the ssd_checker.is_ssd()? Before this point, the only wipe method executed is the "wipe free space", which is allowed to executed regardless in HDDs and SSDs. After that, if we detect that the drive is SSD, we could break the loop. The next conditional checks are elif, so it should only be executed if ssd_checker.is_ssd() is false.

Like you said, there is another task that we need to tackle: inform the user. Some easy way to do it could be, just before we break the loop, we check:

  • if ssd_checker.is_ssd() is True and opt is not in ("1", "0") (wipe free space and exit interactive options)
  • or if ssd_checker.is_ssd() is True and any in path, root_path, home, home_all, swaps are not False

If any of the two above are True, we print a warning informing that the only method allowed on SSD drives is "wipe free space", and then break the loop.

Also we could include the warning in README.md to make it clear from the beginning.

What do you think?

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

2 participants