Skip to content

[Bug]: Add to another machine offers binary ignored files but fails to copy them (WorkspaceBinaryFileError) #36256

Open

Description

@twaitschulies

What happens

In Add to another machine, the list of git-ignored local files offers every file up to 1 MB, binary ones included (images, .DS_Store, SQLite *.db). After the clone, the copy step fails for every selected binary file:

Could not copy 122 files to <machine>
<file>: Failed to read workspace file '<file>' in '<workspace>'.

The server trace shows the cause:

ProjectReadFileError: Failed to read workspace file 'data/x.db-shm' ...
  [cause]: WorkspaceBinaryFileError: Workspace file 'data/x.db-shm' ... is binary and cannot be previewed as text.

Why

The copy (Read file to copy → projects.readFile, then writeFile on the target) goes through the text-preview read, which rejects binary content. The selection filter only checks byteLength <= 1 MiB, so binary files are selectable but can never be copied. Text files in the same selection copy fine.

Repro

  1. A repo with a git-ignored binary file under 1 MB (for example screenshot.png listed in .gitignore).
  2. Project → Add to another machine, tick that file, start the copy.
  3. The toast reports "Could not copy 1 file …" with the error above.

Expected

Either copy binary files byte for byte (a base64 or bytes read/write RPC), or show them as not copyable (greyed out, with a reason) so the dialog does not offer a selection that always fails.

Version

Desktop nightly 0.1.10-nightly.20261113.4643, macOS, both environments on the same build.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions