# # # patch "platform.hh" # from [d2dd265fc09896123e8bd579298c0aa8397b7dc0] # to [28e74359c884cd94c994d4b46259879a358acf6a] # # patch "unix/fs.cc" # from [8c3cc49120e8aefc756371ce46e6684d6ff3481a] # to [5c44a03b4c02ae0910eedfc817e6b64b2e29ed10] # ============================================================ --- platform.hh d2dd265fc09896123e8bd579298c0aa8397b7dc0 +++ platform.hh 28e74359c884cd94c994d4b46259879a358acf6a @@ -136,7 +136,7 @@ void rename_clobberingly(std::string con void make_accessible(std::string const & name); void rename_clobberingly(std::string const & from, std::string const & to); -// path must be a file, not a directory +// path must be an existing file, or an existing empty directory. void do_remove(std::string const & path); // This is platform-specific because it uses raw pathname strings ============================================================ --- unix/fs.cc 8c3cc49120e8aefc756371ce46e6684d6ff3481a +++ unix/fs.cc 5c44a03b4c02ae0910eedfc817e6b64b2e29ed10 @@ -349,6 +349,9 @@ do_remove_recursive(string const & path) // Try plain remove() first; it will tell us if we have anything else // to do. + // + // This assumes POSIX remove, which will remove an empty directory. + // http://www.opengroup.org/onlinepubs/009695399/nfindex.html if (!remove(path.c_str())) return; // successfully deleted a plain file