[FL-3003] Fix logical error in storage script (#2105)
* Fix logical error in storage script * Fix formatting
This commit is contained in:
parent
5c3a5cd8f7
commit
df808be8d7
@ -238,9 +238,9 @@ class FlipperStorage:
|
|||||||
while read_size < size:
|
while read_size < size:
|
||||||
self.read.until("Ready?" + self.CLI_EOL)
|
self.read.until("Ready?" + self.CLI_EOL)
|
||||||
self.send("y")
|
self.send("y")
|
||||||
read_size = min(size - read_size, buffer_size)
|
chunk_size = min(size - read_size, buffer_size)
|
||||||
filedata.extend(self.port.read(read_size))
|
filedata.extend(self.port.read(chunk_size))
|
||||||
read_size = read_size + read_size
|
read_size = read_size + chunk_size
|
||||||
|
|
||||||
percent = str(math.ceil(read_size / size * 100))
|
percent = str(math.ceil(read_size / size * 100))
|
||||||
total_chunks = str(math.ceil(size / buffer_size))
|
total_chunks = str(math.ceil(size / buffer_size))
|
||||||
|
Loading…
Reference in New Issue
Block a user