GNU bug report logs - #71106
dired-do-compress should check before attempting to read directories

Previous Next

Package: emacs;

Reported by: Dan Jacobson <jidanni <at> jidanni.org>

Date: Wed, 22 May 2024 06:37:02 UTC

Severity: normal

Fixed in version 30.1

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 71106 in the body.
You can then email your comments to 71106 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#71106; Package emacs. (Wed, 22 May 2024 06:37:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dan Jacobson <jidanni <at> jidanni.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 22 May 2024 06:37:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Dan Jacobson <jidanni <at> jidanni.org>
To: bug-gnu-emacs <at> gnu.org
Subject: dired-do-compress should check before attempting to read directories
Date: Wed, 22 May 2024 14:35:38 +0800
$ tar tzvf plss00p020_nt00064.tar.gz
-rw-rw-rw- 0/0        24880644 2010-11-13 01:35 plss00p020.shp
-rw-rw-rw- 0/0        50551350 2010-11-13 01:35 plss00p020.dbf
-rw-rw-rw- 0/0          727452 2010-11-13 01:35 plss00p020.shx
-rw-rw-rw- 0/0           31363 2010-12-03 00:06 plss00p020.txt

Now in dired, use Z (runs the command dired-do-compress)

Compress or uncompress plss00p020_nt00064.tar.gz? (y or n) y

dired-insert-directory: Reading directory: No such file or directory, plss00p020_nt00064
emacs-version "29.3"

If it checked first to see if the directory it assumed was created was
really there, then it wouldn't have made an error.

Or it could be like unar, and make the directory, no matter what.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71106; Package emacs. (Wed, 22 May 2024 13:01:02 GMT) Full text and rfc822 format available.

Message #8 received at 71106 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dan Jacobson <jidanni <at> jidanni.org>
Cc: 71106 <at> debbugs.gnu.org
Subject: Re: bug#71106: dired-do-compress should check before attempting to
 read directories
Date: Wed, 22 May 2024 16:00:23 +0300
> From: Dan Jacobson <jidanni <at> jidanni.org>
> Date: Wed, 22 May 2024 14:35:38 +0800
> 
> $ tar tzvf plss00p020_nt00064.tar.gz
> -rw-rw-rw- 0/0        24880644 2010-11-13 01:35 plss00p020.shp
> -rw-rw-rw- 0/0        50551350 2010-11-13 01:35 plss00p020.dbf
> -rw-rw-rw- 0/0          727452 2010-11-13 01:35 plss00p020.shx
> -rw-rw-rw- 0/0           31363 2010-12-03 00:06 plss00p020.txt
> 
> Now in dired, use Z (runs the command dired-do-compress)
> 
> Compress or uncompress plss00p020_nt00064.tar.gz? (y or n) y
> 
> dired-insert-directory: Reading directory: No such file or directory, plss00p020_nt00064
> emacs-version "29.3"

I cannot reproduce this.  I get: "Compress or uncompress: 1 file."
instead.

Did you miss some steps or some other important aspect of the recipe?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71106; Package emacs. (Wed, 22 May 2024 22:52:02 GMT) Full text and rfc822 format available.

Message #11 received at 71106 <at> debbugs.gnu.org (full text, mbox):

From: Dan Jacobson <jidanni <at> jidanni.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 71106 <at> debbugs.gnu.org
Subject: Re: bug#71106: dired-do-compress should check before attempting to
 read directories
Date: Thu, 23 May 2024 06:51:32 +0800
On Wed, May 22, 2024 at 04:00:23PM +0300, Eli Zaretskii wrote:
> I cannot reproduce this.  I get: "Compress or uncompress: 1 file."
> instead.

Please do the following (this time "guaranteed"!) experiment,
bash -ex <<"EOF"
cd /tmp
p=plss00p020 n=nt00064
touch $p.{shp,dbf,shx,txt}
tar -czf ${p}_${n}.tar.gz $p.*
tar tzvf ${p}_${n}.tar.gz
EOF
emacs -Q /tmp

Now hit spacebar until the cursor is upon plss00p020_nt00064.tar.gz
and hit Z then y .

Not only will you get the error message, the line showing plss00p020_nt00064.tar.gz
also has been temporarily abducted, and needs you to hit "g" to be seen again!




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71106; Package emacs. (Thu, 23 May 2024 09:54:02 GMT) Full text and rfc822 format available.

Message #14 received at 71106 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dan Jacobson <jidanni <at> jidanni.org>
Cc: 71106 <at> debbugs.gnu.org
Subject: Re: bug#71106: dired-do-compress should check before attempting to
 read directories
Date: Thu, 23 May 2024 12:53:04 +0300



Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#71106; Package emacs. (Thu, 23 May 2024 09:57:02 GMT) Full text and rfc822 format available.

Message #17 received at 71106 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dan Jacobson <jidanni <at> jidanni.org>
Cc: 71106 <at> debbugs.gnu.org
Subject: Re: bug#71106: dired-do-compress should check before attempting to
 read directories
Date: Thu, 23 May 2024 12:56:40 +0300
merge 71106 47058
close 47058 30.1

> Date: Thu, 23 May 2024 06:51:32 +0800
> From: Dan Jacobson <jidanni <at> jidanni.org>
> Cc: 71106 <at> debbugs.gnu.org
> 
> On Wed, May 22, 2024 at 04:00:23PM +0300, Eli Zaretskii wrote:
> > I cannot reproduce this.  I get: "Compress or uncompress: 1 file."
> > instead.
> 
> Please do the following (this time "guaranteed"!) experiment,
> bash -ex <<"EOF"
> cd /tmp
> p=plss00p020 n=nt00064
> touch $p.{shp,dbf,shx,txt}
> tar -czf ${p}_${n}.tar.gz $p.*
> tar tzvf ${p}_${n}.tar.gz
> EOF
> emacs -Q /tmp
> 
> Now hit spacebar until the cursor is upon plss00p020_nt00064.tar.gz
> and hit Z then y .
> 
> Not only will you get the error message, the line showing plss00p020_nt00064.tar.gz
> also has been temporarily abducted, and needs you to hit "g" to be seen again!

Thanks.  This is a duplicate of bug#47058, which was left unsolved.
So I have now solved it (I hope) on the master branch, and I'm closing
that bug and this one as well.




bug marked as fixed in version 30.1, send any further explanations to 71106 <at> debbugs.gnu.org and Dan Jacobson <jidanni <at> jidanni.org> Request was from Eli Zaretskii <eliz <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 23 May 2024 10:02:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 20 Jun 2024 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 58 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.