From 6d852a96ca6c9cfd3f2d1096a2993baf10a384a1 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 30 Mar 2013 10:56:04 -0400 Subject: [PATCH] Bug #1200 - Fixed bug #1200, where directory removal didn't handle d_type==DT_UNKNOWN (thanks to Jakub Wilk). --- ChangeLog | 2 ++ src/Directory.cpp | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 88900dd37..3a1a4f4d0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -97,6 +97,8 @@ Bugs and caused the 'execute' command to be considered a 'write' command. + Fixed bug #1194, so that $HOME has precedence over the passwd db when looking for the user's home directory (thanks to Jakub Wilk). + + Fixed bug #1200, where directory removal didn't handle d_type==DT_UNKNOWN + (thanks to Jakub Wilk). + Fixed bug #1209, spelling mistake in reference page (thanks to Friedrich Heusler). + Fixed bug #1210 so that widths are taken from localized strings instead of diff --git a/src/Directory.cpp b/src/Directory.cpp index 0d1e76541..2db4f7a61 100644 --- a/src/Directory.cpp +++ b/src/Directory.cpp @@ -117,7 +117,8 @@ bool Directory::remove_directory (const std::string& dir) else unlink ((dir + "/" + de->d_name).c_str ()); #else - if (de->d_type == DT_DIR) + if (de->d_type == DT_DIR || + de->d_type == DT_UNKNOWN) remove_directory (dir + "/" + de->d_name); else unlink ((dir + "/" + de->d_name).c_str ());