Skip to content

Commit

Permalink
Parsing step did not handle return of bytes-count properly if file on…
Browse files Browse the repository at this point in the history
… Dropbox was larger than 1024 MB or 1GB.
  • Loading branch information
a-zb committed Mar 14, 2014
1 parent 0044d1f commit ef5fb95
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dropfuse.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ def getSize(self):
self.pq_file = pyquery.PyQuery(self.file)
size = self.pq_file.find('div.filesize-col span.size').text()
num, var = size.split(" ")
if var.lower() == "mb": return int(float(num)*1024*1024)
if var.lower() == "gb": return int(float(num)*1024*1024*1024)
elif var.lower() == "mb": return int(float(num)*1024*1024)
elif var.lower() == "kb": return int(float(num)*1024)
else: return int(num)

Expand Down

0 comments on commit ef5fb95

Please sign in to comment.