28 lines
921 B
Diff
28 lines
921 B
Diff
From 73e10157dc90309e9d2cea63e1be3c74ed4aa635 Mon Sep 17 00:00:00 2001
|
|
From: Pino Toscano <ptoscano@redhat.com>
|
|
Date: Mon, 29 Sep 2014 16:53:55 +0200
|
|
Subject: [PATCH] chroot: fix quoting in cp invocation
|
|
|
|
Make sure to quote source and destination, to avoid failures when
|
|
dealing with paths with e.g. spaces, brackets, etc.
|
|
---
|
|
src/chroot.ml | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/src/chroot.ml b/src/chroot.ml
|
|
index 63a5a79..d0ee4c3 100644
|
|
--- a/src/chroot.ml
|
|
+++ b/src/chroot.ml
|
|
@@ -60,7 +60,7 @@ let build_chroot debug files outputdir =
|
|
|
|
| S_REG | S_CHR | S_BLK | S_FIFO | S_SOCK ->
|
|
if debug >= 2 then printf "supermin: chroot: copy %s\n%!" opath;
|
|
- let cmd = sprintf "cp -p %s %s" path opath in
|
|
+ let cmd = sprintf "cp -p %s %s" (quote path) (quote opath) in
|
|
ignore (Sys.command cmd)
|
|
with Unix_error _ -> ()
|
|
) files;
|
|
--
|
|
1.9.3
|
|
|