From: Pierre Rouleau <prouleau001@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 49644@debbugs.gnu.org
Subject: bug#49644: 27.2; copy-directory fails when Unix socket file is present in the source directory tree
Date: Mon, 19 Jul 2021 15:50:32 -0400 [thread overview]
Message-ID: <DC4F3B90-9A1F-4E43-A88F-9E4397708C73@gmail.com> (raw)
In-Reply-To: <83zgui5lo3.fsf@gnu.org>
> On Jul 19, 2021, at 12:10 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>
>> 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
I agree that supporting more use cases would be beneficial.
It would be nice that no prompting is required though or at least that it would be possible to use the function in a non-interactive way.
Providing user-options might be the way.
That would leave the signature intact and yet would allow introducing several new behaviours,
whether prompting is used or not, what type of condition is ignored, etc….
For my use case I would at least need to be able to set a copy directory user-option to prevent copy-file from stopping on a Unix socket.
prev parent reply other threads:[~2021-07-19 19:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-19 15:04 bug#49644: 27.2; copy-directory fails when Unix socket file is present in the source directory tree Pierre Rouleau
2021-07-19 16:10 ` Eli Zaretskii
2021-07-19 19:50 ` Pierre Rouleau [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DC4F3B90-9A1F-4E43-A88F-9E4397708C73@gmail.com \
--to=prouleau001@gmail.com \
--cc=49644@debbugs.gnu.org \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).