Implement --max-transfer flag to quit transferring at a limit #1655

This commit is contained in:
Nick Craig-Wood
2018-05-05 12:58:28 +01:00
parent d178233e74
commit 5c128272fd
6 changed files with 57 additions and 2 deletions
+1 -1
View File
@@ -82,7 +82,7 @@ func AddFlags(flagSet *pflag.FlagSet) {
flags.FVarP(flagSet, &fs.Config.BufferSize, "buffer-size", "", "Buffer size when copying files.")
flags.FVarP(flagSet, &fs.Config.StreamingUploadCutoff, "streaming-upload-cutoff", "", "Cutoff for switching to chunked upload if file size is unknown. Upload starts after reaching cutoff or when file ends.")
flags.FVarP(flagSet, &fs.Config.Dump, "dump", "", "List of items to dump from: "+fs.DumpFlagsList)
flags.FVarP(flagSet, &fs.Config.MaxTransfer, "max-transfer", "", "Maximum size of data to transfer.")
}
// SetFlags converts any flags into config which weren't straight foward