You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the phone receives a single file, NectarLink puts it on the phone's clipboard so it can be pasted right away (Core.kt, setFileUri). A later Send clipboard then reaches the fallback in PhoneClipboard.read, where coerceToText() on a file in Downloads returns the file's raw bytes. So the PC gets the file and a garbled text entry.
Your PR for this is welcome. The fix only needs to keep coerceToText() away from items that point to a file. The byte sniffing and the "looks binary" check aren't needed after that, and the sniffing opens the file while the window is getting focus, which can stall the UI with a slow storage provider.
Fixed in #31, thanks Jochen. Copying text that also carries a URI keeps the text now, and other URIs aren't turned into raw content any more. It'll be in the next release.
Activity
thtbee commentedon Oct 18, 2026
Thanks for tracking this down. Here's the cause:
When the phone receives a single file, NectarLink puts it on the phone's clipboard so it can be pasted right away (
Core.kt,setFileUri). A later Send clipboard then reaches the fallback inPhoneClipboard.read, wherecoerceToText()on a file in Downloads returns the file's raw bytes. So the PC gets the file and a garbled text entry.Your PR for this is welcome. The fix only needs to keep
coerceToText()away from items that point to a file. The byte sniffing and the "looks binary" check aren't needed after that, and the sniffing opens the file while the window is getting focus, which can stall the UI with a slow storage provider.thtbee commentedon Oct 19, 2026
Fixed in #31, thanks Jochen. Copying text that also carries a URI keeps the text now, and other URIs aren't turned into raw content any more. It'll be in the next release.
Android: keep clipboard text when an item also has a URI (thtbee#31)