KanoComputing / kano-burners

SD Card burner for OSX
GNU General Public License v2.0
12 stars 11 forks source link

[Improvement] disk.py should detect whether the SD card is write protected #12

Open radujipa opened 10 years ago

radujipa commented 10 years ago

It may be often the case that the Lock switch on a typical SD card had been set either by mistake or by simply inserting the card in the used reader. An appropriate error message should inform the user this has happened.

Perhaps an image could be used to better illustrate what the problem was with the card.

hyperknot commented 10 years ago

Good idea! Any cross platform way to detect if the card is write protected? dd 1000 bytes?

On 13 August 2014 14:33, Radu Jipa notifications@github.com wrote:

It may be often the case that the Lock switch on a typical SD card had been set either by mistake or by simply inserting the card in the used reader. An appropriate error message should inform the user this has happened.

Perhaps an image could be used to better illustrate what the problem was with the card.

— Reply to this email directly or view it on GitHub https://github.com/KanoComputing/kano-burners/issues/12.

radujipa commented 10 years ago

As far as I've seen, it should be quite simple actually. dd may say something like Error writing file: 19 The media is write protected (on Windows anyway) - needs research

Ealdwulf commented 9 years ago

Error messages are now more informative: https://github.com/KanoComputing/kano-burners/commit/415a39bafccec43443aa0f7d275a7e000242b972 https://github.com/KanoComputing/kano-burners/commit/1fa871eeb32b741eeab9cff35aeebaaca0facb97

However at present the downloaded image is still deleted, so users will have to download it again, which is not doubt annoying.

Ealdwulf commented 9 years ago

@rluz To test, try with the lock slid to write only.