mirror of
https://github.com/rclone/rclone.git
synced 2025-08-10 06:09:44 +02:00
backend: skip hash calculation when the hashType is None - fixes #8518
When hashType is None `local` backend still runs expensive logic that reads the entire file content to produce an empty string.
This commit is contained in:
committed by
Nick Craig-Wood
parent
0ee7cd80f2
commit
badf16cc34
@@ -45,6 +45,10 @@ func getFileHashByte(node any, hashType hash.Type) []byte {
|
||||
}
|
||||
|
||||
func getFileHash(node any, hashType hash.Type) string {
|
||||
if hashType == hash.None {
|
||||
return ""
|
||||
}
|
||||
|
||||
var o fs.Object
|
||||
|
||||
switch b := node.(type) {
|
||||
|
Reference in New Issue
Block a user