Severity: medium
Type: bug
Location: clipsync/clipboard.py — _ClipboardFileHandler.on_modified(), on_created(), on_moved() (~line 1220+)
Problem: On Linux, watchdog may deliver event.src_path/dest_path as bytes for paths that are not valid UTF-8. The handlers call .decode() without an encoding or error handler, which raises UnicodeDecodeError and can kill the watchdog dispatch thread.
Suggested fix: Use os.fsdecode() (which uses the filesystem encoding and surrogateescape) instead of .decode(), and ensure on_moved() handles a bytes dest_path before passing it to Path().
Filed from a full-source audit of the repo (2026-07-29). Independently confirmed against the source before filing.
Severity: medium
Type: bug
Location:
clipsync/clipboard.py—_ClipboardFileHandler.on_modified(),on_created(),on_moved()(~line 1220+)Problem: On Linux,
watchdogmay deliverevent.src_path/dest_pathasbytesfor paths that are not valid UTF-8. The handlers call.decode()without an encoding or error handler, which raisesUnicodeDecodeErrorand can kill the watchdog dispatch thread.Suggested fix: Use
os.fsdecode()(which uses the filesystem encoding andsurrogateescape) instead of.decode(), and ensureon_moved()handles a bytesdest_pathbefore passing it toPath().Filed from a full-source audit of the repo (2026-07-29). Independently confirmed against the source before filing.