From: "vajrasky (Vajrasky Kok)" Date: 2014-01-03T17:58:56+09:00 Subject: [ruby-core:59507] [ruby-trunk - Bug #9327] Why FileUtils.rmdir ignores Errno::ENOTEMPTY ? Issue #9327 has been updated by vajrasky (Vajrasky Kok). It is because we add :parents option in FileUtils.rmdir. See this ticket for detail: https://bugs.ruby-lang.org/issues/3178 I already created patch to improve this situation on that ticket. ---------------------------------------- Bug #9327: Why FileUtils.rmdir ignores Errno::ENOTEMPTY ? https://bugs.ruby-lang.org/issues/9327#change-44052 Author: bdimych (Dmitry Bolshakov) Status: Open Priority: Normal Assignee: Category: Target version: ruby -v: ruby 2.0.0p247 (2013-06-27) [i386-mingw32] Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN It catches Errno::ENOTEMPTY and Errno::ENOENT and just does nothing. Most of other FileUtils methods have option "force" which is false by default but rmdir behaves as if it is true implicitly. Imho it looks unexpected. -- http://bugs.ruby-lang.org/