fix(macos): only use trash on local hosts

Fix: #6804
This commit is contained in:
Ellis Kenyő 2022-09-18 06:46:17 +01:00 committed by Henrik Lissner
parent a207a8b703
commit f1e793405d

View file

@ -45,6 +45,9 @@
(setq delete-by-moving-to-trash t) (setq delete-by-moving-to-trash t)
;; Lazy load `osx-trash' ;; Lazy load `osx-trash'
(and IS-MAC (when (not (fboundp 'system-move-file-to-trash))
(not (fboundp 'system-move-file-to-trash)) (defun system-move-file-to-trash (file)
(defalias #'system-move-file-to-trash #'osx-trash-move-file-to-trash))) "Move FILE to trash."
(when (and (not IS-LINUX)
(not (file-remote-p default-directory)))
(osx-trash-move-file-to-trash file)))))