Test: mkdir dir echo -n foobar > dir/file cat <<EOF >apatch --- dir/file +++ /dev/null @@ -1 +0,0 @@ -foobar \ No newline at end of file EOF patch -p0 < apatch ls -al dir # should fail
In 2.6.1, this removed file 'file' and then dir 'dir'. In 2.7.1, it only removes 'file' and 'dir' is kept. The man page reads: "When patch removes a file, it also attempts to remove any empty ancestor directories."