>>> Would it not be easier to unconditionally untar the contents in a >>> temporary directory, and to either move its contents to the current >>> directory if it contains only one entry, or to rename it to a >>> directory based on the tar file name when it contains more than one >>> entry? >> >> Easier in what sense? > > In the sense of "DWIM". > Patch attached.