Close two cross-file handoffs from the round-3 fixes

The terminal's drop target derived the tar entry name from the host path
*after* symlink resolution, so dropping ~/Downloads/latest.log — where
latest.log is a symlink — landed the file in the container under the
target's name. Nothing errored; the user got a name they never typed. The
Files pane had the identical bug and was fixed with `host_upload_name`;
the terminal now calls the same helper, so the two drop targets cannot
drift. It also drops the "dropped-file" fallback, which silently renamed
anything the old `file_name()` could not parse.

`migration_store::load` told the user a backup existed when it had
deliberately not written one. `load` runs on every reconcile, survey and
reaper pass, so a persistently corrupt record reaches MAX_CORRUPT_BACKUPS
within seconds; from then on the copy was skipped while the log still
read "(a copy was kept at <path>)". Three outcomes are now distinct, and
the "enough already" case says so rather than naming a file that is not
there — that being the message someone reads immediately before going to
look for their data.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GBq2rGum6GX7xXgsas1fDc
This commit is contained in:
2026-08-23 15:52:49 -07:00
co-authored by Claude Opus 5
parent 47960e46df
commit 168b61d632
3 changed files with 121 additions and 14 deletions
+1 -1
View File
@@ -978,7 +978,7 @@ pub async fn resolve_host_read_path(path: &str) -> Result<String, String> {
/// `Path::file_name` so a Windows path is split as one wherever this runs, and
/// the answer goes through [`validate_entry_name`] because it becomes a tar
/// entry name, a container path and an argv element.
fn host_upload_name(path: &str) -> Result<String, String> {
pub(crate) fn host_upload_name(path: &str) -> Result<String, String> {
if normalize_host_path(path).ends_with('/') {
// A trailing separator names a directory, and `Downloads` is not the
// name of a file to upload. The recursive-upload refusal further down