mirror of
https://github.com/rclone/rclone.git
synced 2025-06-20 11:47:57 +02:00
b2: fixed possible crash when accessing Backblaze b2 remote
This commit is contained in:
parent
127f48e8ad
commit
35b2ca642c
@ -708,7 +708,7 @@ func (f *Fs) list(ctx context.Context, bucket, directory, prefix string, addBuck
|
|||||||
remote := file.Name[len(prefix):]
|
remote := file.Name[len(prefix):]
|
||||||
// Check for directory
|
// Check for directory
|
||||||
isDirectory := remote == "" || strings.HasSuffix(remote, "/")
|
isDirectory := remote == "" || strings.HasSuffix(remote, "/")
|
||||||
if isDirectory {
|
if isDirectory && len(remote) > 1 {
|
||||||
remote = remote[:len(remote)-1]
|
remote = remote[:len(remote)-1]
|
||||||
}
|
}
|
||||||
if addBucket {
|
if addBucket {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user