[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#40156: 26.3; append-to-file does not work on nonexistent file over s
From: |
Sean Devlin |
Subject: |
bug#40156: 26.3; append-to-file does not work on nonexistent file over ssh |
Date: |
Fri, 20 Mar 2020 19:32:20 -0400 |
Hi folks,
I did a little digging, and I think the problem is in
tramp-sh-handle-write-region around line 3240:
> ;; If `append' is non-nil, we copy the file locally, and let
> ;; the native `write-region' implementation do the job.
> (when append (copy-file filename tmpfile 'ok))
It looks like copy-file fails if filename doesn’t exist. Adding a test for file
existence (i.e. file-exists-p) to the condition seems to solve the problem,
though admittedly I only tested for my own narrow use case.
Thanks!