Re: [Setup-tool-hackers] rmtree



On Tue, 2001-09-11 at 03:11, Arturo Espinosa Aldama wrote:
> 
> Seems like rmtree is buggy. I can't believe such a thing could get
> through, but the bug is quite clearly there, and we can't demand people on
> updating their perl installation too, so I replicated the function and
> corrected the bug in xst_file_rmtree.

Yeah, I noticed that 'bug' and tried to figure out what's wrong with it.
I couldn't find out! The problem part is something liske this:

stat ($existsn_dir)

if (-d _) {
  delete_dir;
}

else {
  delete_file;
}

What's the oddest part, it works PERFECTLY in every other situation. Try
to make a clean file and call that same function on that same file, it
works! '_' (underscore) symbol in perl means cached value of previous
stat call but we have somehow turned off that caching. I wouldn't call
it a bug though, I think it's more like 'gotcha' :)

Tambet


_______________________________________________
setup-tool-hackers maillist  -  setup-tool-hackers@ximian.com
http://lists.ximian.com/mailman/listinfo/setup-tool-hackers



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]