Thinking about this even more, maybe if create=true we want to always create the file, and never ignore create-mode or create-size?
(One issue with the current code is if the file exists already, we truncate it to the correct size but leave the existing content. But callers might reasonably expect that create=true creates an all-zeroes sparse file). I think we could do this using O_TRUNC. The permissions can be set using sftp_setstat (which I think ignores umask). 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 _______________________________________________ Libguestfs mailing list [email protected] https://listman.redhat.com/mailman/listinfo/libguestfs
