Forward port 930ff266f2 to cmount branch

compare checksums on upload/download via FUSE
This commit is contained in:
Nick Craig-Wood
2017-05-15 16:56:44 +01:00
parent 855071cc19
commit bc9856b570
9 changed files with 137 additions and 23 deletions
+2 -4
View File
@@ -27,6 +27,7 @@ import (
// Globals
var (
noModTime = false
noChecksum = false
debugFUSE = false
noSeek = false
dirCacheTime = 5 * 60 * time.Second
@@ -50,6 +51,7 @@ var (
func init() {
cmd.Root.AddCommand(commandDefintion)
commandDefintion.Flags().BoolVarP(&noModTime, "no-modtime", "", noModTime, "Don't read/write the modification time (can speed things up).")
commandDefintion.Flags().BoolVarP(&noChecksum, "no-checksum", "", noChecksum, "Don't compare checksums on up/download.")
commandDefintion.Flags().BoolVarP(&debugFUSE, "debug-fuse", "", debugFUSE, "Debug the FUSE internals - needs -v.")
commandDefintion.Flags().BoolVarP(&noSeek, "no-seek", "", noSeek, "Don't allow seeking in files.")
commandDefintion.Flags().DurationVarP(&dirCacheTime, "dir-cache-time", "", dirCacheTime, "Time to cache directory entries for.")
@@ -147,10 +149,6 @@ like this:
* those which need to know the size in advance won't - eg B2
* maybe should pass in size as -1 to mean work it out
* Or put in an an upload cache to cache the files on disk first
### TODO ###
* Check hashes on upload/download
`,
Run: func(command *cobra.Command, args []string) {
cmd.CheckArgs(2, 2, command, args)