mirror of
https://github.com/rclone/rclone.git
synced 2025-01-10 08:18:27 +01:00
pcloud: return an early error when Put is called with an unknown size
This stops the 10 minute pause in the integration tests
This commit is contained in:
parent
478434ffef
commit
d77f594ee7
@ -1092,6 +1092,10 @@ func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, op
|
|||||||
modTime := src.ModTime(ctx)
|
modTime := src.ModTime(ctx)
|
||||||
remote := o.Remote()
|
remote := o.Remote()
|
||||||
|
|
||||||
|
if size < 0 {
|
||||||
|
return errors.New("can't upload unknown sizes objects")
|
||||||
|
}
|
||||||
|
|
||||||
// Create the directory for the object if it doesn't exist
|
// Create the directory for the object if it doesn't exist
|
||||||
leaf, directoryID, err := o.fs.dirCache.FindPath(ctx, remote, true)
|
leaf, directoryID, err := o.fs.dirCache.FindPath(ctx, remote, true)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user