[Python-Dev] Coernic Desktop Search versus shutil.rmtree
Bob Ippolito
bob at redivi.com
Fri Sep 3 18:58:46 CEST 2004
On Sep 2, 2004, at 9:30 PM, Tim Peters wrote:
> [Aahz]
>> Question is, what happens when you use Explorer while Coernic is busy
>> inside a folder? If it barfs, then I think it's reasonable for
>> rmtree()
>> to barf. Or are you saying that it's not possible to make that test?
>
> I didn't claim it was unreasonable for shutil.rmtree to barf, and I
> have no interest in making that test. As mentioned before, Copernic's
> use of the filesystem hooks drives CVS crazy too. It's a new app, and
> using the filesystem hooks transparently is a subtle undertaking.
> They'll fix it eventually.
It could very well be a bug in Windows, too. I think I ran across one
last night.
Sometimes win32's os.stat(...) raises an exception for folders that
*do* exist. The only case I ran into was an iPod though. The iPod is
a 3rd generation 15gb (read: not a new click wheel), FAT32 formatted
(fresh restore from the win32 iPod Updater) managed by iTunes with
"Enable disk use" on, and is plugged into a laptop with a "low speed"
USB port (I think 1.1, whatever was before 2.0). It is mounted as
'F:\\' and it has several folders on the root (IIRC ['Notes',
'Calendars', 'Contacts', 'iPod_Control']). Nothing special about any
of the folders, except iPod_Control which is attrib +h.
os.stat fails on EVERY folder except 'F:\\iPod_Control'.
os.listdir('F:\\') shows them all. win32api.GetFileAttributes works on
all of these folders and returns just FILE_DIRECTORY (or whatever it's
called, I don't have a win32 machine where I'm at right now; the
constant is 16). iPod_Control probably returns a slightly different
set of flags, I don't remember trying it.
os.stat('F:\\Notes\\Instructions') succeeds (Instructions is a file).
I believe this may be a bug in _wstat64i (name may be slightly wrong..
from memory) or something? I tried it on Windows XP (not SP2, but
should be otherwise patched up) with the python.org distributions of
Python 2.3.0 and Python 2.3.4 and got the same results both times.
-bob
More information about the Python-Dev
mailing list