Serhiy Storchaka added the comment: Directory entry should be added not only when directory is empty. See also issue20912. ---------- _______________________________________ Python tracker <report at bugs.python.org> <http://bugs.python.org/issue22219> _______________________________________