codebytere

#50044: chore: remove applescript from trash

Merged
Created: Mar 3, 2026, 3:11:24 AM
Merged: Mar 4, 2026, 5:16:34 AM
5 comments
Target: main

Description of Change

Previously, when trashItemAtURL: failed (e.g. on network shares or under app translocation), the code fell back to constructing an AppleScript that interpolated the bundle path directly into a string literal. This was fragile and unnecessary — trashItemAtURL: has been the standard API since 10.8 and covers the relevant cases. The fix simply removes the AppleScript fallback entirely, so Trash() now returns the result of trashItemAtURL: directly.

Checklist

Release Notes

Notes: none

Backports

38-x-y
Merged
PR Number
#50067
Merged At
Mar 4, 2026, 2:32:48 PM
Released In
v38.8.6
Release Date
Mar 10, 2026, 10:36:31 AM
39-x-y
Merged
PR Number
#50064
Merged At
Mar 4, 2026, 9:42:14 AM
Released In
v39.8.1
Release Date
Mar 12, 2026, 7:33:07 AM
40-x-y
Merged
PR Number
#50065
Merged At
Mar 4, 2026, 9:14:15 AM
Released In
v40.8.0
Release Date
Mar 5, 2026, 11:25:08 AM
41-x-y
Merged
PR Number
#50066
Merged At
Mar 4, 2026, 9:14:12 AM
Released In
v41.0.0-beta.8
Release Date
Mar 5, 2026, 5:19:12 PM

Semver Impact

Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.

Semantic Versioning helps users understand the impact of updates:

  • Major (X.y.z): Breaking changes that may require code modifications
  • Minor (x.Y.z): New features that maintain backward compatibility
  • Patch (x.y.Z): Bug fixes that don't change the API
  • None: Changes that don't affect using facing parts of Electron