Skip to content

Embedded attachments cannot be opened since 1.7.x #2892

Closed

Description

@tohSHt4w

Environment:

  • Operating System: Windows 11
  • CherryTree Version: 1.7.1

Summary:
Since upgrading from CherryTree 1.6.x to 1.7.x, embedded attachments can no longer be opened when the option "Custom Actions for File Links" is enabled.
The same configuration worked in earlier versions.

Configuration:
Settings -> Links -> Custom Actions for File Links

Originally configured as:
explorer %s $
This configuration no longer works in CherryTree 1.7.x.

For testing, it was also changed to:
cmd.exe /c start "" "%s"
The issue remains.

Expected Behavior:
When double-clicking an embedded attachment, CherryTree should extract the attachment to a temporary location and open it using the configured application or the Windows file association.

Actual Behavior:

  • With "Custom Actions for File Links" enabled:
    • The attachment does not open.
    • With "explorer %s &", Windows Explorer opens instead of the attachment.
    • With "cmd.exe /c start "" "%s"", Windows attempts to open a file from a temporary location, but the file cannot be found.
  • With the option disabled:
    • Attachments does open normally but:

Files Tested:

  • ODS: opens correctly (LibreOffice) when the option is disabled.
  • XLSX: opens correctly (Excel) when the option is disabled.
  • TXT: opens when the option is disabled, but uses Notepad instead of the selected Windows default editor (Vim)
  • LOG: does not open at all and should be opended in Vim too
  • Other embedded file types are also affected when the custom file-link action is enabled.

Tests Performed:

  1. Verified that embedded attachments are stored correctly.

    • Using "Save As..." on the attachment works.
    • The exported file is valid and can be opened normally.
  2. Checked Windows file associations.

    • TXT files are associated with Vim/GVim.
    • Running:
      start "" test.txt / test.log
      correctly opens Vim/GVim.

    Therefore the Windows file association itself appears to be working correctly.

  3. Monitored the temporary directory.

    • The expected attachment file does not appear to be available when CherryTree executes the custom command.
    • The configured command receives a temporary path that cannot be opened.

Why this appears to be a bug:
The attachment data itself is not corrupted because manual export works correctly.
The problem only occurs when a custom file-link action is configured.
This suggests that CherryTree may be applying the custom file-link command to embedded attachments incorrectly, or is providing an invalid/non-existing temporary file path to the configured command.

Regression:
The problem was not observed before upgrading to CherryTree 1.7.x and appears to be a regression introduced in the 1.7 series.

Additional Notes:
The default example configuration "explorer %s &" appears to no longer work correctly with embedded attachments on Windows.

Activity

  1. giuspen commented on Aug 15, 2026

    @giuspen
    Owner

    Thanks for the detailed report, this has now been fixed. The fix will be in upcoming v1.7.2. If you are happy to test it before the release, I can give you a development version to try it.

  2. tohSHt4w commented on Aug 16, 2026

    @tohSHt4w
    Author

    Thanks for the detailed report, this has now been fixed. The fix will be in upcoming v1.7.2. If you are happy to test it before the release, I can give you a development version to try it.

    If you'd like me to test it, I'd be happy to. Otherwise I can wait until the release.
    Thank you for taking this on. Thank you also for the time you're putting into development and for the software you're making open and public available to all of us. I really appreciate this!

  3. giuspen commented on Aug 17, 2026

    @giuspen
    Owner

    Thank you @tohSHt4w, if you are happy to test a pre-release including this fix please find it at https://www.giuspen.net/cherrytree/#testing (called v1.7.1+8)

  4. tohSHt4w commented on Aug 19, 2026

    @tohSHt4w
    Author

    Thanks. It seems to be working with the "explorer %s &" option enabled as expected.
    You can close this thread as resolved.
    A donation is coming soon ;-)

  5. giuspen commented on Aug 19, 2026

    @giuspen
    Owner

    Thanks @tohSHt4w !

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions