mirror of
https://git.savannah.gnu.org/git/tar.git
synced 2026-08-16 22:36:05 +00:00
Eliminate redundant chdir_do
If one-top-level is not provided, chdir_do is a no-op.
This commit is contained in:
committed by
Paul Eggert
parent
b17665b2c0
commit
325b899214
+7
-4
@@ -1989,10 +1989,13 @@ extract_archive (void)
|
||||
bool ok = false;
|
||||
if (fun)
|
||||
{
|
||||
/* Create one_top_level dir if it does not exist. */
|
||||
one_top_level_prepare = true;
|
||||
chdir_do (chdir_current, !!one_top_level_dir);
|
||||
one_top_level_prepare = false;
|
||||
if (one_top_level_dir)
|
||||
{
|
||||
/* Create one_top_level dir if it does not exist. */
|
||||
one_top_level_prepare = true;
|
||||
chdir_do (chdir_current, true);
|
||||
one_top_level_prepare = false;
|
||||
}
|
||||
if (fun (current_stat_info.file_name, typeflag))
|
||||
ok = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user