Skip to content

Files added to an archive can't be opened until it is saved #450

Backlog

Description

@sarensw

A file added to an archive shows in the list at once, but until the archive is saved nothing can read it: every read looks it up in the archive file, by its place there, and it isn't in the file yet.

Steps

  1. Open a zip in MacPacker and add photos.zip and notes.txt to it. Don't save.
  2. Click the triangle of photos.zip: nothing opens.
  3. Select notes.txt and press Space, or double-click it: "Extraction of item failed, but no url was returned".

A file dropped on photos.zip was accepted and lost. #440 stops that for now: until the archive is saved, an archive added to it is a file like any other, with no triangle, and a file dropped on it goes beside it.

Expected
A file added but not saved yet behaves like one already in the archive: Space and double-click show it, an archive opens below its row, and files dropped into it go in.

Fix
The add knows where the file is on disk, and may read it: the save does.

  • Quick Look and opening read an unsaved file from there.
  • An unsaved archive opens from a copy, as an archive inside is unpacked. What is dropped into it goes into the copy, and the save adds the copy instead of the original, which stays as it was.
  • feat: the archive window shows archives as a tree (#251) #440's stopgap goes: isUnopenedArchive in ArchiveOutlineController turns down a row without an index.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions