Skip to content

worker: refuse folder and /data/adb backups to a Telegram destination - #19

Draft
ash-iir wants to merge 1 commit into
mainfrom
fix-telegram-path-adb
Draft

ash-iir wants to merge 1 commit into
mainfrom
fix-telegram-path-adb

Conversation

@ash-iir

@ash-iir ash-iir commented Nov 19, 2026

Copy link
Copy Markdown
Owner

Backend #10. A folder (path) or /data/adb backup to a Telegram destination always failed: PKG is .paths/<name> or .adb/<ts>, so the packed file name "${PKG}__…vdb.tar" points into a missing subdirectory and tar -f fails with ERR_TRANSFER, after the local backup was already written.

Replacing the / would make the upload work, but telegram-pull only knows app backups (<pkg>__<ts>_<vc>.vdb.tar into <backups>/<pkg>/), so these uploads could not be restored. Until there is a pull path for .paths/.adb, this refuses them up front:

  • do_path_backup and do_adb_backup: right after resolve_dest, a Telegram destination ends with ERR_TG_KIND before any work is done.
  • New msg_err_tg_kind in en.js and en.json (same key); other languages fall back to English. The op card shows it through errMsg.

Not changed: the WebUI still lists Telegram destinations in the folder/adb destination pickers; hiding them there would be a separate UI change.

Testing

  • sh -n, mksh -n, busybox sh -n; shellcheck -s sh: same 96 warnings as main. en.json parses; node --check on en.js.
  • The real do_path_backup and do_adb_backup with stubbed resolve_dest/transport_guard/finish, under mksh R59, busybox 1.37 ash and dash: Telegram ends with ERR_TG_KIND; rclone and local continue to the transport check.
  • WebUI not run (no playwright in this environment).
  • Not tested on a rooted device.

Telegram stores one archive per app backup and telegram-pull restores
only those. A folder or /data/adb backup to Telegram failed at upload
time, after the local copy was written, and could not have been pulled
back. Refuse it right after the destination is resolved with
ERR_TG_KIND, and add the matching English message.

Signed-off-by: ash-iir <254348575+ash-iir@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant