[Gllug] PHP Guru's
Richard Jones
rich at annexia.org
Mon Jul 19 14:56:44 UTC 2010
On Mon, Jul 19, 2010 at 01:19:57PM +0200, salsaman at xs4all.nl wrote:
> "/bin/mkdir -p" and mkdir() do two different things. As do "/bin/rm -rf"
> and rmdir() [ok, so the latter is not really applicable here].
That's not what Tet was talking about.
What happens to your code:
com=g_strdup_printf("/bin/rm -rf %s",dir);
dummyvar=system(com);
if the string dir contains a space, like dir = "/foo /"?
Anyway, statvfs can be called on *any* file or directory within the
filesystem. It doesn't have to be called at the top level, and it's
both crazy and dangerous for a reporting function to be creating
directories.
> Yes, I suppose I could have done something more elegant like you suggest,
> but when singlehanedly coding 54 man years of code in just 8 years*, quick
> and ugly cut and paste often beats slower and elegant :-)
>
> *https://www.ohloh.net/p/lives (estimate)
Ohloh's estimates are broken. It estimates libguestfs to have taken
16 man-years (it was something in centuries back when we included all
the generated code), not bad for something which has existed for a
little over a year and certainly does not have a team of a dozen
people behind it.
Rich.
--
Richard Jones
Red Hat
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list