From 1e92520076ccc319fdae29e6fdc6a75bd523b5a2 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Tue, 22 Sep 2026 11:03:16 +0100 Subject: [PATCH] iclouddrive: fix potential crash looking up items findItem read the response status code when the lookup failed, so a failure with no HTTP response panicked. Thanks to @manus-pi for finding this problem. --- backend/iclouddrive/iclouddrive.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/iclouddrive/iclouddrive.go b/backend/iclouddrive/iclouddrive.go index 3c78e3bce..a2e6cbc87 100644 --- a/backend/iclouddrive/iclouddrive.go +++ b/backend/iclouddrive/iclouddrive.go @@ -92,7 +92,7 @@ func (f *Fs) findItem(ctx context.Context, dir string) (item *api.DriveItem, fou item, resp, err = f.service.GetItemByPath(ctx, path.Join(f.root, dir)) return shouldRetry(ctx, resp, err) }); err != nil { - if item == nil && resp.StatusCode == 404 { + if item == nil && resp != nil && resp.StatusCode == 404 { return nil, false, nil } return nil, false, err