GNU bug report logs - #29094
dired-do-compress creates empty archives

Previous Next

Package: emacs;

Reported by: Max <mu <at> magi.net.ru>

Date: Wed, 1 Nov 2017 00:02:02 UTC

Severity: normal

Tags: fixed, patch

Fixed in version 26.1

Done: Noam Postavsky <npostavs <at> users.sourceforge.net>

Bug is archived. No further changes may be made.

Full log


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

From: Noam Postavsky <npostavs <at> users.sourceforge.net>
To: Max <mu <at> magi.net.ru>
Cc: 29094 <at> debbugs.gnu.org
Subject: Re: bug#29094: dired-do-compress creates empty archives
Date: Mon, 04 Dec 2017 20:46:07 -0500
tags 29094 + patch
quit

Max <mu <at> magi.net.ru> writes:

> When Z is pressed on a directory, dired (according to
> dired-compress-file-suffixes variable) runs the following command:
>
> tar -c directory | gzip -c9 > directory.tar.gz
>
> On my system running this command results in an error:
>
> tar: Failed open to write on /dev/rst0: Permission denied
>
> as tar(1) defaults -f to /dev/rst0.
>
> Argument '-f-' should be used to write to stdout.

Right, the GNU tar manual says [1]

    By default, tar uses an archive file name that was compiled when it was
    built on the system; usually this name refers to some physical tape
    drive on the machine. However, the person who installed tar on the
    system may not have set the default to a meaningful value as far as most
    users are concerned.

So it's actually a bit surprising that the current values apparently
work for most people.  I guess most GNU/Linux distros set the default to
stdin?

As far as I can tell, dropping the 'f' option was just an oversight (see
[2] and other messages in that thread).

> Also '-v' is probably not needed here, since the output is not used
> anywhere.

Makes sense.

> Here is a patch to correct this behaviour:

I think it's good for emacs-26.  I assume you haven't assigned copyright
to Emacs (so it should be marked as a tiny change)?

[1]: https://www.gnu.org/software/tar/manual/html_node/file.html
[2]: https://lists.gnu.org/archive/html/emacs-devel/2015-10/msg01282.html 




This bug report was last modified 7 years and 214 days ago.

Previous Next


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