about summary refs log tree commit diff
path: root/src/libstd/os.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/os.rs')
-rw-r--r--src/libstd/os.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstd/os.rs b/src/libstd/os.rs
index 3afd946ee26..1bfae8c40e1 100644
--- a/src/libstd/os.rs
+++ b/src/libstd/os.rs
@@ -790,7 +790,7 @@ pub fn list_dir_path(p: &Path) -> ~[Path] {
 /// all its contents. Use carefully!
 pub fn remove_dir_recursive(p: &Path) -> bool {
     let mut error_happened = false;
-    for walk_dir(p) |inner| {
+    do walk_dir(p) |inner| {
         if !error_happened {
             if path_is_dir(inner) {
                 if !remove_dir_recursive(inner) {
@@ -803,6 +803,7 @@ pub fn remove_dir_recursive(p: &Path) -> bool {
                 }
             }
         }
+        true
     };
     // Directory should now be empty
     !error_happened && remove_dir(p)