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: Eli Zaretskii
Subject: bug#47058: 28.0.50; Dired Z: insert-directory: Reading directory: No such file or directory, CrossLine_linux_x86
Date: Wed, 22 Sep 2021 08:40:30 +0300

> Date: Tue, 21 Sep 2021 19:19:52 +0000
> From: Gregory Heytings <gregory@heytings.org>
> cc: mvar.40k@gmail.com, larsi@gnus.org, mcenturion@fing.edu.uy, 
>     arthur.miller@live.com, 47058@debbugs.gnu.org
> 
> >> TMP=$(mktemp -d ./XXXXXXXX)
> >> tar -C $TMP -x -z -f $FILE
> >> if (($(ls $TMP | wc -l) == 1))
> >> then
> >>    mv $TMP/* .
> >>    rmdir $TMP
> >> else
> >>    mv $TMP $(basename $FILE .tar.gz)
> >> fi
> >
> > Wouldn't that remove the files that are in the directory but not in the 
> > archive?
> 
> No, it does what I explained above:

If you move a directory over another by renaming, the previous
directory is gone, and replaced by the one you moved in its place,
right?  I'm not talking about what GNU mv does, I'm talking about what
Emacs will do when renaming a directory into another one.

> If all files in the tar file are under one directory (e.g. 
> emacs-27.2.tar.gz whose files are all in a emacs-27.2 directory), the 
> files will be in that directory.
> 
> If on the contrary the tar file is "broken" and its files are under 
> multiple directories or not in a directory (say foobar.tar.gz with three 
> files "/foo", "/bar" and "/baz"), the files will be put in a directory 
> "foobar".

That was not my question.





reply via email to

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