https://bugs.kde.org/show_bug.cgi?id=523547

Albert Vaca Cintora <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|https://invent.kde.org/netw |https://invent.kde.org/netw
                   |ork/kdeconnect-kde/-/commit |ork/kdeconnect-kde/-/commit
                   |/3435f69097534b4c9f077988ec |/510e8729d826e3fdc172643ec3
                   |2986e849213be1              |1f0c87ef6372a1

--- Comment #3 from Albert Vaca Cintora <[email protected]> ---
Git commit 510e8729d826e3fdc172643ec31f0c87ef6372a1 by Albert Vaca Cintora, on
behalf of Méven Car.
Committed on 28/07/2026 at 05:26.
Pushed by albertvaka into branch 'release/26.08'.

Keep files that arrive whole but not in the announced size

The check added in 7cb4de20c compared the bytes written against the size the
sender announced and took every difference for a failed transfer, deleting
the file. Two of those differences are not failures.

A sender can announce a size it then does not keep to. The Android app asks
the content provider how big the file is and opens the stream in a separate
call, so a provider whose stream does not match the size in its own listing
sends more than was announced. The file arrives whole and is deleted for it.

A sender that does not know the size announces -1. The Android app does that
whenever the content provider reports no size, which happens for a file that
is not stored on the phone. Nothing was announced, so the comparison could
never hold and every such file was deleted. Three lines above, startTransfer
already tells this case apart with m_size >= 0.

Only a file that stops short of an announced size is an incomplete one. Keep
the rest, and note in the log when more arrived than was announced.
(cherry picked from commit 3435f69097534b4c9f077988ec2986e849213be1)

M  +10   -3    core/filetransferjob.cpp
M  +89   -0    tests/sendfiletest.cpp

https://invent.kde.org/network/kdeconnect-kde/-/commit/510e8729d826e3fdc172643ec31f0c87ef6372a1

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to