PATCH: fix for broken run-parts

Gabriel L. Somlo somlo at cmu.edu
Mon Apr 30 15:45:43 UTC 2007


Ok, please disregard the last patch I sent :) I just realized that
bb_get_last_path_component() *must* be destructive, since if the
argument *ends* with a '/', we have to hack it off...

The only other way to do this would be for
bb_get_last_path_component() to return a newly allocated string, but
I'm not sure I like this any better.

So, nevermind replacing it with strrchr()

Sorry for all the noise :)

--Gabriel


> If so, here's another patch doing just that (should go on top of
> svn 18532 or later). While we're at it, I modified
> bb_get_last_path_component() to be non-destructive of its argument.
> If this patch is applied, we can proceed to remove all the "dirty
> hacks" used to work around bb_get_last_path_component() being
> destructive (lots of xstrdup() calls and the like :) )



More information about the busybox mailing list