emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: dired-do-rename on "." and ".."


From: Luc Teirlinck
Subject: Re: dired-do-rename on "." and ".."
Date: Mon, 9 Jun 2003 13:00:56 -0500 (CDT)

>From my previous message:

   We mark:

   file1
   .
   file2
   ..

   We rename the marked files to directory b

   We now get:

   b/file1 and b/. which now contains all files originally in . except
   file1

   ./file2 is now a non-existent file in a no longer existing directory
   Do we throw an error or do we update and rename b/./file2 to b/file2 ?

   .. still exists, but is no longer the parent directory of .

   My guess is that the user wound up marking . and .. inadvertently.  I
   would throw an error from the very beginning without renaming
   anything.  (Which is exactly what currently happens.)

Sorry, I explained this in a confusing way.

Let .. be ~/d, . be ~/d/c and rename the above four marked files to
~/b.

We get ~/b/file1 and ~/b/c which contains all files originally in ~/d/c
except file1.

~/d/c/file2 is now a non-existent file in a non-existing directory.
Hence, we throw an error.  Except, we could view ~/d/c/file2 as ./file2
and update . to ~/b/c, in which case file2 is now ~/b/c/file2, exists
and get renamed to ~/b/file2.

But if one takes the second view, then by consistency .. is now b.

A mess I would rather not mess with.  The user marked . and .. by
mistake.

Sincerely,

Luc.





reply via email to

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