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

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

bug#49644: 27.2; copy-directory fails when Unix socket file is present i


From: Eli Zaretskii
Subject: bug#49644: 27.2; copy-directory fails when Unix socket file is present in the source directory tree
Date: Mon, 19 Jul 2021 19:10:52 +0300

> From: Pierre Rouleau <prouleau001@gmail.com>
> Date: Mon, 19 Jul 2021 11:04:39 -0400
> 
> There is no Emacs crash involved here.  It's just a feature request.
> 
> Try `copy-directory' on a directory tree that contains one Unix socket.
> Something like "~/elpa/gnupg" which often contains Unix socket files.
> This will fail with an error stating that the Unix socket cannot be
> copied.
> 
> Although its true that Unix sockets cannot be copied, it would be nice
> to offer the users the ability to copy the directory tree anyway,
> skipping the Unix socket files.
> 
> The function `copy-directory' does not provide a mechanism to skip the
> copy of such files, so it becomes impossible to copy a directory tree
> that contains such a file.  It would be useful to add argument to
> provide the ability to skip such files.   Currently, the only way is to
> override or advise the function `copy-file' when using `copy-directory'.

I think it would be more useful to add an optional behavior whereby
any file that cannot be copied for some reason would not terminate the
copy.  There's no need to allow such tolerance only for sockets.  I
could imagine a huge file that cannot be copied because the target
directory doesn't have enough space, for example.  Perhaps ask the
user whether to continue, when a copy fails, or provide a user option





reply via email to

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