sysprep: allow to specify globbing for --delete

Adapt the globbing part from the old --remote-path work previously
proposed for sysprep [1], allowing --delete to perform globbing when
deleting paths.

[1] https://www.redhat.com/archives/libguestfs/2013-October/msg00045.html
This commit is contained in:
Pino Toscano
2013-12-09 16:19:12 +01:00
committed by Richard W.M. Jones
parent 7a41f5c126
commit ed4bcb119c

View File

@@ -27,7 +27,9 @@ let add_paths path = paths := path :: !paths
let path_perform g root =
let paths = List.rev !paths in
List.iter g#rm_rf paths;
if paths <> [] then (
List.iter (fun glob -> Array.iter g#rm_rf (g#glob_expand glob)) paths
);
[]
let op = {