mrc0mmand / rpms / libguestfs

Forked from rpms/libguestfs 3 years ago
Clone
Blob Blame History Raw
From 0828c8f3f4fceaba6fab17d2dfaf689702265c85 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 13 Apr 2017 09:57:37 +0100
Subject: [PATCH] v2v: -o rhv: Quote parameter to rm -rf.

This was safe before, the change just prevents accidental errors.

(cherry picked from commit 24a6c5b57c25e0e59697831b55000d6f8e21fd38)
---
 v2v/output_rhv.ml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/v2v/output_rhv.ml b/v2v/output_rhv.ml
index f407b4e..02bd312 100644
--- a/v2v/output_rhv.ml
+++ b/v2v/output_rhv.ml
@@ -205,7 +205,7 @@ object
         List.iter (
           fun image_uuid ->
             let d = images_dir // image_uuid in
-            let cmd = sprintf "rm -rf %s" d in
+            let cmd = sprintf "rm -rf %s" (quote d) in
             Changeuid.command changeuid_t cmd
         ) image_uuids
       )
-- 
2.9.4