[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ange-ftp won't make remote backup files
From: |
Chris Moore |
Subject: |
Re: ange-ftp won't make remote backup files |
Date: |
Tue, 7 Oct 2003 03:31:03 +0200 |
Richard Stallman writes:
> Does this replacement function make things work more or less right?
>
> (defun backup-buffer-copy (from-name to-name modes)
> (condition-case ()
> (copy-file from-name to-name t t)
> (file-error
> ;; If copying fails because file TO-NAME
> ;; is not writable, delete that file and try again.
> (if (and (file-exists-p to-name)
> (not (file-writable-p to-name)))
> (delete-file to-name))
> (copy-file from-name to-name t t)))
> (and modes
> (set-file-modes to-name (logand modes #o1777))))
More right. I can edit files and keep backups now. Thanks.
Chris.