From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs 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 Message-ID: <83zgui5lo3.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33689"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 49644@debbugs.gnu.org To: Pierre Rouleau Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 19 18:13:22 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m5VtR-0008c6-Ke for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 19 Jul 2021 18:13:21 +0200 Original-Received: from localhost ([::1]:42630 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m5VtQ-0003hJ-NB for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 19 Jul 2021 12:13:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57514) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m5VsA-0002Gr-E4 for bug-gnu-emacs@gnu.org; Mon, 19 Jul 2021 12:12:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48549) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m5VsA-0003Vs-2K for bug-gnu-emacs@gnu.org; Mon, 19 Jul 2021 12:12:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m5Vs9-0002MO-Qj for bug-gnu-emacs@gnu.org; Mon, 19 Jul 2021 12:12:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Jul 2021 16:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49644 X-GNU-PR-Package: emacs Original-Received: via spool by 49644-submit@debbugs.gnu.org id=B49644.16267110659007 (code B ref 49644); Mon, 19 Jul 2021 16:12:01 +0000 Original-Received: (at 49644) by debbugs.gnu.org; 19 Jul 2021 16:11:05 +0000 Original-Received: from localhost ([127.0.0.1]:60095 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5VrF-0002LC-2H for submit@debbugs.gnu.org; Mon, 19 Jul 2021 12:11:05 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:59590) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5VrE-0002Kk-3o for 49644@debbugs.gnu.org; Mon, 19 Jul 2021 12:11:04 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:47890) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m5Vr8-0002rN-KR; Mon, 19 Jul 2021 12:10:58 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3450 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m5Vr8-0003b7-6T; Mon, 19 Jul 2021 12:10:58 -0400 In-Reply-To: (message from Pierre Rouleau on Mon, 19 Jul 2021 11:04:39 -0400) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:210287 Archived-At: > From: Pierre Rouleau > 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