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: Thu, 27 Oct 2022 14:51:39 -0300 Message-ID: References: <83r0ytl042.fsf@gnu.org> <83bkpxkwcd.fsf@gnu.org> 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="25891"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58721@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 27 19:52:18 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 1oo73C-0006cf-A6 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 27 Oct 2022 19:52:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oo72y-00038e-Qz; Thu, 27 Oct 2022 13:52:04 -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 1oo72w-0002d3-Ex for bug-gnu-emacs@gnu.org; Thu, 27 Oct 2022 13:52:02 -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 1oo72w-0004IB-2o for bug-gnu-emacs@gnu.org; Thu, 27 Oct 2022 13:52:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oo72v-0004Bq-OC for bug-gnu-emacs@gnu.org; Thu, 27 Oct 2022 13:52: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: Thu, 27 Oct 2022 17:52: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.166689311916093 (code B ref 58721); Thu, 27 Oct 2022 17:52:01 +0000 Original-Received: (at 58721) by debbugs.gnu.org; 27 Oct 2022 17:51:59 +0000 Original-Received: from localhost ([127.0.0.1]:59263 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oo72s-0004BU-PF for submit@debbugs.gnu.org; Thu, 27 Oct 2022 13:51:59 -0400 Original-Received: from mail-pj1-f42.google.com ([209.85.216.42]:55231) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oo72q-0004BH-Qb for 58721@debbugs.gnu.org; Thu, 27 Oct 2022 13:51:57 -0400 Original-Received: by mail-pj1-f42.google.com with SMTP id h14so2281818pjv.4 for <58721@debbugs.gnu.org>; Thu, 27 Oct 2022 10:51:56 -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=WO7NkP6z5mSnbGNQXFFO3BoIp0OKWetPXtq1A/txtqs=; b=T1HujSvj7JLMl0O2iMHy9/i+1FP7RBe899312ltgzwCtuYCGGF6dBapUz3THzX1MiX wRijcnBO5vbqZXLRZjNUfLLCJrQNp6O/kbLPgfOkbB+WS2JTL7U/ZZaN59OF9wSsvutG pb71mEEohMwY9HWFv6ptZzBFYXhZfYBVln+coamBm4IJSQjK4U2mOijxXjCJCyvl/V3Q LGh2RTpr+nPjwn0hepPcJbjDdxayoIFQNs+kaoeBi7xEvLWdAbY9leB8PPKGYpBQGGGA mRtgQee6AO9jS4IqVnm6AMOUak9w7QNvQMIPNpn64F3z37GkxK6GBwP5hMb6wpnrua38 jb2g== 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=WO7NkP6z5mSnbGNQXFFO3BoIp0OKWetPXtq1A/txtqs=; b=v/QF8zFxy7IZUt6R70nS9OXXOIjP9+IKUJhvOKE6K9RjRFZ56GkW4l6Mp1HuFfMLz2 saNmIU4N/1gz6dJN7HyvDSms9iizoTAqK8sHTwgH7iURCu/YSWX0uMf7FkrabPj1bMjw T3YoBlb7WGlrS270mNJpuaJ5Ec5+OAAhYrg/tpNGrm/nMsPfJZBzag71NIPZRmkSnZdl WxUF9a785S4Snw+W13Y5ToHiVUTnV97Gqi9m/GZUcsoUT9MiboS7Fxnl/1YPsJb+9jAA VOV6E9CTk5AWwZZlTjRt5L3YZmhU9njZyisXKtA53r5tklqszldIOhcUykGrHHUTnoT7 +GLA== X-Gm-Message-State: ACrzQf3HVx+mS2JOd7ijNevxmNaX8nj6K2tJghZWtu1a5iqb7BAA94DZ 41OruTk74478OOqWuW6hgzgmTYY9aG4yBFyWjdX4Hry6Eipwbw== X-Google-Smtp-Source: AMsMyM7WR+Y6iaGMy6icwKzokzcBOQuBkUgRRUkyQ5m9YV7nY2+JZ2o0FrnljZjeWoPuQ8zYnbvGw9NNUpBBgSdtOTk= X-Received: by 2002:a17:903:283:b0:186:897e:71ea with SMTP id j3-20020a170903028300b00186897e71eamr29359792plr.123.1666893110940; Thu, 27 Oct 2022 10:51:50 -0700 (PDT) In-Reply-To: <83bkpxkwcd.fsf@gnu.org> 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:246348 Archived-At: On Thu, 27 Oct 2022 at 14:30, Eli Zaretskii wrote: > And the directory by that name really already exists under Trash? > That would mean something is wrong with make-temp-file on your system, > because it's supposed to return a different file name. You will see > that move-file-to-trash calls make-temp-file near its end. Well, not like this. It existed because Emacs created it. Indeed, a Trash should be able to receive multiple files of the same name, and they must be uniquified somehow, and that's what Emacs is doing by appending a suffix to the file name. But, to be clear on the process. Before starting things, I cleared my Trash, so that "~/.local/share/Trash/files" is empty. I clone the repo, and move it to trash with (move-file-to-trash "/path/to/org-mode"). Now "~/.local/share/Trash/files" contains "org-mode", with proper contents, as expected. I clone again and move to trash again with (move-file-to-trash "/path/to/org-mode"). Now it fails with "(file-already-exists "File exists" "/home//.local/share/Trash/files/org-mode7AV...")", and "~/.local/share/Trash/files" contains: org-mode org-mode7AVOuq Where "org-mode7AVOuq" is empty. And "org-mode", with contents, is still in "/path/to/org-mode". > (I cannot myself try reproducing this because I don't have access to a > system with freedesktop.org-style Trash.) Understood, I'm at your disposal to send any information and perform any tests you need.