diff lisp/net/tramp-ftp.el @ 108244:2ee48fcc701c

Add FORCE argument to `delete-file'. * net/ange-ftp.el (ange-ftp-del-tmp-name): Make it a defun, forcing to delete the temporary file. (ange-ftp-delete-file): Add FORCE arg. (ange-ftp-rename-remote-to-remote) (ange-ftp-rename-local-to-remote, ange-ftp-rename-remote-to-local) (ange-ftp-load, ange-ftp-compress, ange-ftp-uncompress): Force file deletion. * net/tramp-compat.el (tramp-compat-delete-file): New defun. * net/tramp.el (tramp-handle-delete-file): Add FORCE arg. (tramp-handle-make-symbolic-link, tramp-handle-load) (tramp-do-copy-or-rename-file-via-buffer) (tramp-do-copy-or-rename-file-directly) (tramp-do-copy-or-rename-file-out-of-band) (tramp-handle-process-file, tramp-handle-call-process-region) (tramp-handle-shell-command, tramp-handle-file-local-copy) (tramp-handle-insert-file-contents, tramp-handle-write-region) (tramp-delete-temp-file-function): Use `tramp-compat-delete-file'. * net/tramp-fish.el (tramp-fish-handle-delete-file): Add FORCE arg. (tramp-fish-handle-make-symbolic-link) (tramp-fish-handle-process-file): Use `tramp-compat-delete-file'. * net/tramp-ftp.el (tramp-ftp-file-name-handler): Use `tramp-compat-delete-file'. * net/tramp-gvfs.el (tramp-gvfs-handle-delete-file): Add FORCE arg. (tramp-gvfs-handle-write-region): Use `tramp-compat-delete-file'. * net/tramp-imap.el (tramp-imap-handle-delete-file): Add FORCE arg. (tramp-imap-do-copy-or-rename-file): Use `tramp-compat-delete-file'. * net/tramp-smb.el (tramp-smb-handle-delete-file): Add FORCE arg. (tramp-smb-handle-copy-file, tramp-smb-handle-file-local-copy) (tramp-smb-handle-rename-file, tramp-smb-handle-write-region): Use `tramp-compat-delete-file'.
author Michael Albinus <michael.albinus@gmx.de>
date Wed, 05 May 2010 12:20:23 +0200
parents 1d1d5d9bd884
children 511da81b16c5
line wrap: on
line diff
--- a/lisp/net/tramp-ftp.el	Wed May 05 00:27:16 2010 -0400
+++ b/lisp/net/tramp-ftp.el	Wed May 05 12:20:23 2010 +0200
@@ -1,7 +1,7 @@
 ;;; tramp-ftp.el --- Tramp convenience functions for Ange-FTP
 
-;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007,
-;;   2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+;;   2009, 2010 Free Software Foundation, Inc.
 
 ;; Author: Michael Albinus <michael.albinus@gmx.de>
 ;; Keywords: comm, processes
@@ -182,7 +182,7 @@
 	  (unwind-protect
 	      (rename-file tmpfile newname (car args))
 	    ;; Cleanup.
-	    (ignore-errors (delete-file tmpfile)))))
+	    (ignore-errors (tramp-compat-delete-file tmpfile 'force)))))
 
        ;; Normally, the handlers must be discarded.
        ;; `inhibit-file-name-handlers' isn't sufficient, because the