瀏覽代碼

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

master
JustAnotherArchivist 2 年之前
父節點
當前提交
fdc3c3d69e
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      ia-upload-stream

+ 2
- 2
ia-upload-stream 查看文件

@@ -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):


Loading…
取消
儲存