On Sun, Mar 22, 2020 at 01:09:17PM +0100, Denis Fondras wrote: > On Sun, Mar 22, 2020 at 11:41:55AM +0100, Marc Espie wrote: > > If tar can't create intermediate directories due to permission > > issues, the resulting message is confusing: > > > > ./tar xf gcc.tar gcc-8.3.0/include/obstack.h > > tar: Unable to create gcc-8.3.0/include/obstack.h: No such file or directory > > > > (here I have gcc-8.3.0 owned by root and no permissions) > > > > The following patch changes this to: > > > > ./tar xf gcc.tar gcc-8.3.0/include/obstack.h > > tar: Unable to create gcc-8.3.0/include: Permission denied > > tar: Unable to create gcc-8.3.0/include/obstack.h: No such file or directory > > > > Why not use errno on line 106 of file_subs.c ? > That would yield "Permission denied" on obstack.h and would avoid having 2 > error > messages.
... except that the error is not on obstack.h, but on a specific directory creation.
