On Thu, Mar 05, 2015 at 01:01:23PM +0000, Richard W.M. Jones wrote:
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.
Actually no I don't suggest that.
Suggest writing a variant of rm_rf_only_files which truncates
instead of deletes.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html