bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#47058: 28.0.50; Dired Z: insert-directory: Reading directory: No suc


From: Michalis V.
Subject: bug#47058: 28.0.50; Dired Z: insert-directory: Reading directory: No such file or directory, CrossLine_linux_x86
Date: Tue, 21 Sep 2021 12:18:50 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

> So I think the correct solution for this bug is to catch the error of
> the missing directory, and instead present the user with an
> informative message saying that the files were extracted into a
> directory such-and-such.  Because otherwise 'Z' in the OP's use case
> did TRT: it unpacks the file into the current directory, as instructed
> by the archive, the only problem is the error it signals.  That
> archives should not generally have file names without leading
> directories is not our problem; using 'tar' or some other unpacking
> command would produce the same result, and there's no reason Emacs
> should work differently.  In fact, one could argue that Emacs should
> work the same, to be consistent with those other methods of unpacking.
>
> I don't think we should have this "solution" in Emacs 28.


hi Eli,

thanks for the feedback. I agree that changing the behavior of the
command just to solve this corner case is not ideal. Actually i'm
neither for nor against merging this patch. It was more of an example
solution to trigger some feedback (and i got a first glimpse of ert :)

Btw one of the reasons i went with this approach and included -C
parameter for tars were some security concerns expressed in #25611. 

There's also a suggestion in the discussion there that Z should just
decompress and not untar the archive and the un-tarring should be a
separate action/procedure. That would be a drastic solution to this
problem but on the other hand it would make sense semantically
(extract != decompress). What is your opinion on this?

in any case i'll try to assemble another patch based on your suggestion.

thank you,
Michalis





reply via email to

[Prev in Thread] Current Thread [Next in Thread]