Skip to content

Commit

Permalink
[FL-3003] Fix logical error in storage script (flipperdevices#2105)
Browse files Browse the repository at this point in the history
* Fix logical error in storage script
* Fix formatting
  • Loading branch information
gsurkov authored Dec 8, 2022
1 parent 5c3a5cd commit df808be
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/flipper/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,9 @@ def read_file(self, filename):
while read_size < size:
self.read.until("Ready?" + self.CLI_EOL)
self.send("y")
read_size = min(size - read_size, buffer_size)
filedata.extend(self.port.read(read_size))
read_size = read_size + read_size
chunk_size = min(size - read_size, buffer_size)
filedata.extend(self.port.read(chunk_size))
read_size = read_size + chunk_size

percent = str(math.ceil(read_size / size * 100))
total_chunks = str(math.ceil(size / buffer_size))
Expand Down

0 comments on commit df808be

Please sign in to comment.