From ee26daecd8a7143e2f5140548a01a67f8c733962 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Wed, 23 Sep 2026 12:21:43 +0100 Subject: [PATCH] internxt: fix server-side moves failing with "Not Found" or "already exists" Moving a file into a directory which had just been created failed with "Not Found (status 404)", and moving a file over one which had just been deleted (as sync does with --backup-dir and --suffix) failed with "A file with the same name already exists in destination folder (status 409)". The API checks moves against read replicas which lag behind writes, so retry these errors until the replicas catch up. --- backend/internxt/internxt.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/backend/internxt/internxt.go b/backend/internxt/internxt.go index 598384439..fc4f1b46f 100644 --- a/backend/internxt/internxt.go +++ b/backend/internxt/internxt.go @@ -974,6 +974,12 @@ func (f *Fs) Move(ctx context.Context, src fs.Object, remote string) (fs.Object, // Move the file server-side err = f.pacer.Call(func() (bool, error) { err := files.MoveFile(ctx, f.cfg, srcObj.uuid, directoryID, newName, newType) + // The move is checked against lagging read replicas so it can + // fail with 404 if the destination directory was just created + // or 409 if a file at the destination was just deleted. + if err != nil && isStaleReadError(err, true) { + return true, err + } return f.shouldRetry(ctx, err) }) if err != nil {