mirror of
https://github.com/byReqz/go-etcher.git
synced 2024-11-22 06:51:15 +00:00
fix blockdevices being unwritable
This commit is contained in:
parent
4dfdda9e78
commit
95f4d1d682
2
main.go
2
main.go
@ -204,6 +204,7 @@ func main() {
|
||||
} else {
|
||||
inputsize, err = image.Seek(0, io.SeekEnd)
|
||||
inputisblock = true
|
||||
_, _ = image.Seek(0, 0)
|
||||
}
|
||||
target, err := os.OpenFile(device, os.O_RDWR, 0660)
|
||||
if err != nil {
|
||||
@ -219,6 +220,7 @@ func main() {
|
||||
} else {
|
||||
targetsize, err = target.Seek(0, io.SeekEnd)
|
||||
targetisblock = true
|
||||
_, _ = target.Seek(0, 0)
|
||||
}
|
||||
if err != nil {
|
||||
s.Stop()
|
||||
|
Loading…
Reference in New Issue
Block a user