Remove empty directories in recursive merge
The code was actually supposed to do that, but was accidentally broken. Noticed by Anders Melchiorsen. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
This commit is contained in:

committed by
Shawn O. Pearce

parent
fee75457fc
commit
41f13af558
@ -444,10 +444,8 @@ static int remove_file(int clean, const char *path, int no_wd)
|
||||
return -1;
|
||||
}
|
||||
if (update_working_directory) {
|
||||
unlink(path);
|
||||
if (errno != ENOENT || errno != EISDIR)
|
||||
if (remove_path(path) && errno != ENOENT)
|
||||
return -1;
|
||||
remove_path(path);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user