emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug in Ange-FTP with renaming files


From: Kai Großjohann
Subject: Re: Bug in Ange-FTP with renaming files
Date: Sun, 06 Jul 2003 17:10:47 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

address@hidden (Kai Großjohann) writes:

> Shouldn't dired-rename-subdir be conditioned on either file or newname
> being a directory?  Or perhaps both?  Or shouldn't dired-rename-subdir
> take care to do the right thing with non-directories?

I now tried this.  I enabled the following patch.

Now it is barfing in dired-add-entry :-/

I'm getting lost in a maze of twisty litte funcalls, all similar.

--- dired-aux.el.~1.110.~       Sat Mar 22 19:23:45 2003
+++ dired-aux.el        Sun Jul  6 17:02:01 2003
@@ -1020,6 +1020,7 @@
 ;;;###autoload
 (defun dired-rename-file (file newname ok-if-already-exists)
   (dired-handle-overwrite newname)
+  (let ((is-dir (file-directory-p file)))
   (rename-file file newname ok-if-already-exists) ; error is caught in 
-create-files
   ;; Silently rename the visited file of any buffer visiting this file.
   (and (get-file-buffer file)
@@ -1027,7 +1028,8 @@
         (set-visited-file-name newname nil t)))
   (dired-remove-file file)
   ;; See if it's an inserted subdir, and rename that, too.
-  (dired-rename-subdir file newname))
+  (when is-dir
+  (dired-rename-subdir file newname))))
 
 (defun dired-rename-subdir (from-dir to-dir)
   (setq from-dir (file-name-as-directory from-dir)


-- 
~/.signature





reply via email to

[Prev in Thread] Current Thread [Next in Thread]