[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#10489: 24.0.92; dired-do-copy may create infinite directory hierarch
From: |
Stefan Monnier |
Subject: |
bug#10489: 24.0.92; dired-do-copy may create infinite directory hierarchy |
Date: |
Wed, 22 Feb 2012 17:00:08 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.93 (gnu/linux) |
> Ok, that is true for the solutions you propose below, but what's wrong
> with the solution I have proposed:
> Just checking if the destination directory is a subdirectory of the
> directory we want to copy.
It's not a bad plan, but it's difficult to make it catch all cases
because it's difficult to figure out if "the destination directory is
a subdirectory of the directory we want to copy".
[ e.g. because of ignored cases differences, or use of different names
to refer to the same directory, because of MICROS~1 mangling. ]
Of course checking if two directories are one and the same isn't that
easy to do it reliably either (e.g. for lack of inodes on Windows
systems, and actually I'm not sure what happens if we refer to the same
dir via two different mount points, using GNU/Linux's "bind" mounts, or
mounting dirs multiple times).
I guess the two options aren't mutually exclusive, so it's probably
worth doing a first check before starting the whole operation (trying
to find out if the destination is a parent of the source based on
file-truename), and then adding another check in the recursive loop to
try and detect inf-loops.
Stefan
- bug#10489: 24.0.92; dired-do-copy may create infinite directory hierarchy, Thierry Volpiatto, 2012/02/21
- bug#10489: 24.0.92; dired-do-copy may create infinite directory hierarchy, Stefan Monnier, 2012/02/21
- bug#10489: 24.0.92; dired-do-copy may create infinite directory hierarchy, Michael Albinus, 2012/02/21
- bug#10489: 24.0.92; dired-do-copy may create infinite directory hierarchy, Thierry Volpiatto, 2012/02/21
- bug#10489: 24.0.92; dired-do-copy may create infinite directory hierarchy, Stefan Monnier, 2012/02/21
- bug#10489: 24.0.92; dired-do-copy may create infinite directory hierarchy, Thierry Volpiatto, 2012/02/22
- bug#10489: 24.0.92; dired-do-copy may create infinite directory hierarchy,
Stefan Monnier <=
- bug#10489: 24.0.92; dired-do-copy may create infinite directory hierarchy, Thierry Volpiatto, 2012/02/23
- bug#10489: 24.0.92; dired-do-copy may create infinite directory hierarchy, Thierry Volpiatto, 2012/02/23
- bug#10489: 24.0.92; dired-do-copy may create infinite directory hierarchy, Stefan Monnier, 2012/02/23
- bug#10489: 24.0.92; dired-do-copy may create infinite directory hierarchy, Thierry Volpiatto, 2012/02/23
- bug#10489: 24.0.92; dired-do-copy may create infinite directory hierarchy, Thierry Volpiatto, 2012/02/24
- bug#10489: 24.0.92; dired-do-copy may create infinite directory hierarchy, Thierry Volpiatto, 2012/02/24
- bug#10489: 24.0.92; dired-do-copy may create infinite directory hierarchy, Eli Zaretskii, 2012/02/24
- bug#10489: 24.0.92; dired-do-copy may create infinite directory hierarchy, Thierry Volpiatto, 2012/02/24
- bug#10489: 24.0.92; dired-do-copy may create infinite directory hierarchy, Thierry Volpiatto, 2012/02/24
- bug#10489: 24.0.92; dired-do-copy may create infinite directory hierarchy, Michael Albinus, 2012/02/24