mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 05:07:51 +08:00
linkbox: fix list paging and optimized synchronization.
1. The maximum number of objects on a page should be no more than 1000. Currently it is 1024, for this reason the listing always ends on the first page with the error “object not found”, rclone tries to upload the file again, Linkbox stores it with the name “filename(N)”, and so the storage fills up indefinitely. 2. A hyphen is added to the list of allowed characters, that makes queries more optimized (no need to load all files in a directory for an entity with a hyphen).
This commit is contained in:
parent
4258ad705e
commit
d9601c78b1
|
@ -36,7 +36,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
maxEntitiesPerPage = 1024
|
maxEntitiesPerPage = 1000
|
||||||
minSleep = 200 * time.Millisecond
|
minSleep = 200 * time.Millisecond
|
||||||
maxSleep = 2 * time.Second
|
maxSleep = 2 * time.Second
|
||||||
pacerBurst = 1
|
pacerBurst = 1
|
||||||
|
@ -220,7 +220,7 @@ type listAllFn func(*entity) bool
|
||||||
//
|
//
|
||||||
// If the name doesn't match this then do an dir list instead
|
// If the name doesn't match this then do an dir list instead
|
||||||
// N.B.: Linkbox doesn't support search by name that is longer than 50 chars
|
// N.B.: Linkbox doesn't support search by name that is longer than 50 chars
|
||||||
var searchOK = regexp.MustCompile(`^[a-zA-Z0-9_ .]{1,50}$`)
|
var searchOK = regexp.MustCompile(`^[a-zA-Z0-9_ -.]{1,50}$`)
|
||||||
|
|
||||||
// Lists the directory required calling the user function on each item found
|
// Lists the directory required calling the user function on each item found
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in New Issue
Block a user