From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gustavo Barros Newsgroups: gmane.emacs.bugs Subject: bug#58721: 28.2; dired with delete-by-moving-to-trash can't trash directory twice Date: Sun, 30 Oct 2022 20:10:04 -0300 Message-ID: References: <835yg1f5u1.fsf@gnu.org> <50290.1667168405@alto> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21354"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 58721@debbugs.gnu.org To: Mike Kupfer Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 31 00:11:31 2022 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 1opHSk-0005Pp-3x for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 31 Oct 2022 00:11:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1opHSN-00031q-OU; Sun, 30 Oct 2022 19:11:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1opHSI-00031N-Hn for bug-gnu-emacs@gnu.org; Sun, 30 Oct 2022 19:11:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1opHSI-0002XJ-5D for bug-gnu-emacs@gnu.org; Sun, 30 Oct 2022 19:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1opHSH-0002sa-PA for bug-gnu-emacs@gnu.org; Sun, 30 Oct 2022 19:11:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gustavo Barros Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 30 Oct 2022 23:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58721 X-GNU-PR-Package: emacs Original-Received: via spool by 58721-submit@debbugs.gnu.org id=B58721.166717142311019 (code B ref 58721); Sun, 30 Oct 2022 23:11:01 +0000 Original-Received: (at 58721) by debbugs.gnu.org; 30 Oct 2022 23:10:23 +0000 Original-Received: from localhost ([127.0.0.1]:39211 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1opHRf-0002rf-6y for submit@debbugs.gnu.org; Sun, 30 Oct 2022 19:10:23 -0400 Original-Received: from mail-pg1-f182.google.com ([209.85.215.182]:39724) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1opHRe-0002rT-Cv for 58721@debbugs.gnu.org; Sun, 30 Oct 2022 19:10:22 -0400 Original-Received: by mail-pg1-f182.google.com with SMTP id b5so9293963pgb.6 for <58721@debbugs.gnu.org>; Sun, 30 Oct 2022 16:10:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=zYir0UH9BW/QGeDK3KM1nAs1X7bWhGCINAaDOm6kELs=; b=KSKHdJM+U8tKcyjE8QPT1dwQHpNY+gdvUIjsH1a3Af4VGljaW3kolOQ/2YN/Lkt/Gm E2PIjRlhOFtMbaXHAAehaeeVmX6txHOtzcB5rh7CYCc0zUbI9WkJlrshXf1Vgqfe9aKq zvPychOpATKglgZZ+tz7u43qJwMK3YqiE9AqTuob3uG7Sora9rnsJetpZIe/U6mL0qUX TOJBIU+LsS37XLZUGpXw8BbBY7UUhxiNWeZdE415oUzfVuH5b3UdAf+EhVp7BYZwNYWd zMOsfLN8XWdRuopkv7wsJAMbYhUFdGTtwBbnaFJRsPEduksp6ho1lOvamDbSyw9mm+Ey uEjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=zYir0UH9BW/QGeDK3KM1nAs1X7bWhGCINAaDOm6kELs=; b=pvL4MqXANNa+TxQZh0TtjOq9fVh+i6KxA0i7QjpPYeysirVUN3cwy1KDZ//NUlJZDa 7dDzgHRdioVmEEZhXsa+rKplfeg5fW4TzYQ4qOd+5fk+HEgWVik/ns6Vo4HUQCrKGdZg sV3vDkWGNKmw14qV7fUbOM0OBNsD5F77kHm7i7sEpOAG46rN1LyNhGCEH2G4H2duNrlU 3iNI5o7gOI2ao6sl7D9CZR5h6wOliECq8M+pWDALEYIy94Ts+0w2x6CRTxWt8TArR5VV eMbRdMp6aK0ZHX/p/FcyziNmzH5ILDQBPqHqdliF8M3kOlp7FcACY78MAPb89VptnDo7 LYIw== X-Gm-Message-State: ACrzQf2wrSXk7f2oZSjUoVyMlyHAGePJYiBR/BvtaQnB7YSA/4zmbgGk 27CzV8Eh49qmhRYxp+5dpAuZKseL7seAkgpIySo= X-Google-Smtp-Source: AMsMyM4pKGLN1rmuDk+tM3+oP8VZN8nBt3SPnsYSKSzJDGNkH46T+osUxACJiIAQo3QGziA8zWANzAVZQqc4FyAX2rk= X-Received: by 2002:a05:6a00:a21:b0:562:99d6:c30a with SMTP id p33-20020a056a000a2100b0056299d6c30amr11021177pfh.35.1667171416400; Sun, 30 Oct 2022 16:10:16 -0700 (PDT) In-Reply-To: <50290.1667168405@alto> 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: , Original-Sender: "bug-gnu-emacs" Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:246657 Archived-At: On Sun, 30 Oct 2022 at 19:20, Mike Kupfer wrote: > Well, it turns out I hadn't tested my previous patch enough. It handled > the first deletion of directory foo, but not subsequent deletions (which > was the entire point of the fix, sigh). I've attached another patch. > I took a stab at improving the commenting in the code while I was > there. I may be wrong but, as far as my reading goes, I think this might misbehave if the "directory" is a symlink. `is-directory' is built as `(file-directory-p fn)' which returns t even if it is a symlink to a directory. Would things such as `copy-directory` (with `copy-contents` arg t) and `delete-directory' work just as well in such a case? Besides that, in general, imho I cannot think of this issue as something else other than a misbehavior of `rename-file', so that the patch in these terms feels like a workaround. I understand Eli disagrees. True, most likely this is just a muggle (me) being naive, so I'll try to watch and learn.