Attachments with a `/` slash in the filename fail to open or Quick Look

Steps to reproduce

  1. Drop a PDF or other filetype into an Agenda note.
  2. Rename the attachment with a / (slash) in the Name
  3. Click the attachment and attempt to Open or launch Quick Look
  4. Nothing happens

Console Logs when clicking Open

default	17:25:57.675888 -0700	Agenda	open on /var/folders/cd/dbl7k8zj5d99_wx_8dv1n44w0000gq/T/com.momenta.agenda.macos/TemporaryItems/(A Document Being Saved By Agenda 47)/Business Card /a.png: No such file or directory
default	17:25:57.681776 -0700	Agenda	E SectionTextViewEditor.swift(1112) : temporaryCopyOfAttachmentFile(withInfo:) : Could not copy item: Error Domain=NSCocoaErrorDomain Code=4 "The file “4367A8F4-ECF8-4FFA-B2FC-0E2219284CF3.png” doesn’t exist." UserInfo={NSSourceFilePathErrorKey=/Users/evan/Library/Containers/com.momenta.agenda.macos/Data/Documents/Agenda/Stores/1EF90875-6BFF-41D6-938D-0A48972C9D75.agenda-document/Blobs/4367A8F4-ECF8-4FFA-B2FC-0E2219284CF3.png, NSUserStringVariant=(
    Copy
), NSDestinationFilePath=/var/folders/cd/dbl7k8zj5d99_wx_8dv1n44w0000gq/T/com.momenta.agenda.macos/TemporaryItems/(A Document Being Saved By Agenda 47)/Business Card /a.png, NSFilePath=/Users/evan/Library/Containers/com.momenta.agenda.macos/Data/Documents/Agenda/Stores/1EF90875-6BFF-41D6-938D-0A48972C9D75.agenda-document/Blobs/4367A8F4-ECF8-4FFA-B2FC-0E2219284CF3.png, NSUnderlyingError=0x600003b92cd0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}

What I expected

Either:

Note that : does actually work as currently implemented, and shows up as a / in the Finder GUI, but this is probably undesired behavior.

Diagnostics

  • Agenda version: 5.5 (PDL)
  • OS X version: Version 10.14.5 (Build 18F132)
  • AppKit version: 1671.5
  • Device type: MacBookPro12,1
  • Projects: 4
  • Sync: Enabled
  • Other devices: 2

Will take a look. It’s a messy business, because in the UNIX layer, / definitely has special meaning. Can no doubt be worked around, but needs some thought.