[issue1743] IDLE fails to launch

Martin v. Löwis report at bugs.python.org
Tue Jan 22 23:38:12 CET 2008


Martin v. Löwis added the comment:

I've studied the problem with Process Monitor. If a file is hidden,
open(f, "w") fails, whereas os.open(f, os.W_OK|os.O_CREAT) succeeds.

In the succeeding call, process monitor reports

Desired Access:	Generic Read/Write
Disposition:	OpenIf
Options:	Synchronous IO Non-Alert, Non-Directory File
Attributes:	N
ShareMode:	Read, Write
AllocationSize:	0
OpenResult:	Opened

In the failing call, it reports

Desired Access:	Generic Write, Read Attributes
Disposition:	OverwriteIf
Options:	Synchronous IO Non-Alert, Non-Directory File
Attributes:	N
ShareMode:	Read, Write
AllocationSize:	0

I then tried os.open(f, os.W_OK|os.CREAT|os.O_TRUNC) which also fails,
giving

Desired Access:	Generic Read/Write
Disposition:	OverwriteIf
Options:	Synchronous IO Non-Alert, Non-Directory File
Attributes:	N
ShareMode:	Read, Write
AllocationSize:	0

So it fails for FILE_OVERWRITE_IF, but succeeds for FILE_OPEN_IF. These 
map back to CREATE_ALWAYS and OPEN_ALWAYS - apparently, you can't 
truncate a hidden file on Vista.

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1743>
__________________________________


More information about the Python-bugs-list mailing list