From: Liu Yuan <[email protected]>

Signed-off-by: Liu Yuan <[email protected]>
---
 sheep/md.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/sheep/md.c b/sheep/md.c
index 5de777b..1b45a37 100644
--- a/sheep/md.c
+++ b/sheep/md.c
@@ -605,6 +605,9 @@ static int do_plug_unplug(char *disks, bool plug)
        old_nr = md_nr_disks;
        path = strtok(disks, ",");
        do {
+               if (purge_directory(path) < 0)
+                       goto out;
+
                if (plug)
                        md_add_disk(path);
                else
-- 
1.7.9.5

-- 
sheepdog mailing list
[email protected]
http://lists.wpkg.org/mailman/listinfo/sheepdog

Reply via email to