mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
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:
committed by
Richard W.M. Jones
parent
7a41f5c126
commit
ed4bcb119c
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user