Renaming a directory does not delete it in the local cache. This causes rmdir operation failure of parent directory, as local cache is not empty. Steps to replicate this,
mkdir test && cd test
mkdir -p one/two \
&& touch one/two/a.txt \
&& mv one/two one/three \
&& touch one/three/a.txt
rm -rf *
Renaming a directory does not delete it in the local cache. This causes rmdir operation failure of parent directory, as local cache is not empty. Steps to replicate this,