search for: maybefil

Displaying 3 results from an estimated 3 matches for "maybefil".

Did you mean: maybefiles
2015 Mar 05
2
[PATCH] customize: add --truncate-recursive option
Allows user to recursively truncate all files in a directory. Related to RHBZ#119673 Maros Zatko (1): customize: add --truncate-recursive option builder/cmdline.ml | 3 ++- customize/customize_run.ml | 6 ++++++ generator/customize.ml | 8 ++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) -- 1.9.3
2015 Mar 05
0
[PATCH] customize: add --truncate-recursive option
...644 --- a/customize/customize_run.ml +++ b/customize/customize_run.ml @@ -251,6 +251,12 @@ exec >>%s 2>&1 msg (f_"Truncating: %s") path; g#truncate path + | `TruncateRecursive path -> + msg (f_"Recursively truncating: %s") path; + let maybefiles = Array.to_list (g#find path) in + let files = List.filter (fun f -> g#is_file (path ^ f)) maybefiles in + List.iter (fun f -> g#truncate (path ^ f)) files; + | `Timezone tz -> msg (f_"Setting the timezone: %s") tz; if not (Timezone.set_timezone g r...
2015 Mar 05
1
Re: [PATCH] customize: add --truncate-recursive option
On Thu, Mar 05, 2015 at 01:58:21PM +0100, Maros Zatko wrote: > + let files = List.filter (fun f -> g#is_file (path ^ f)) maybefiles in I'm surprised that path ^ f works ... Suggest using the library function `rm_rf_only_files' instead. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts phys...