On 09/21/10 10:14 AM, Alok Aggarwal wrote:
On Tue, 21 Sep 2010, Keith Mitchell wrote:
Out of curiosity, what's the reasoning behind prepending everything
with "./" and then stripping out that same "./" on line 168?
By prepending paths with './' we are making sure that following
exclusion algorithm works as expected:
compress_fset = set(ba_flist) - set(exp_uc_flist)
Since find(["."]) at 95 (creates list containing all boot archive
entries)
generates paths with leading './', we need to assure that
list of entries not eligible for compression also start with './'.
That makes sense. For new code in the future, I believe use of
os.path functions (rather than manually modifying strings) will allow
better manipulation of file path strings to ensure that code such as
the set operations used here work properly. Since such a change would
need to occur across the whole module at once to be truly effective,
I don't see a need to modify this code at this time.
The new DC that's being developed will use os.path
throughout the code. Drew has also made sure that
'find' doesn't get used in the new DC, instead os.walk
gets used (performance is much better with os.walk anyway).
Alok
Fantastic! Thanks.
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss