Parcourir la source

Support float values for --partsize with M or G suffix

master
JustAnotherArchivist il y a 2 ans
Parent
révision
fdc3c3d69e
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. +2
    -2
      ia-upload-stream

+ 2
- 2
ia-upload-stream Voir le fichier

@@ -310,9 +310,9 @@ def main():
except ValueError:
pass
if x.endswith('M'):
return int(x[:-1]) * 1024 ** 2
return int(float(x[:-1]) * 1024 ** 2)
elif x.endswith('G'):
return int(x[:-1]) * 1024 ** 3
return int(float(x[:-1]) * 1024 ** 3)
raise ValueError

def parts(x):


Chargement…
Annuler
Enregistrer