This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
| Author | loewis |
|---|---|
| Recipients | Piffen, christian.heimes, kbk, loewis, richjtd |
| Date | 2008年01月22日.22:38:10 |
| SpamBayes Score | 0.06928253 |
| Marked as misclassified | No |
| Message-id | <1201041492.71.0.488717213985.issue1743@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
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. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2008年01月22日 22:38:13 | loewis | set | spambayes_score: 0.0692825 -> 0.06928253 recipients: + loewis, kbk, christian.heimes, richjtd, Piffen |
| 2008年01月22日 22:38:12 | loewis | set | spambayes_score: 0.0692825 -> 0.0692825 messageid: <1201041492.71.0.488717213985.issue1743@psf.upfronthosting.co.za> |
| 2008年01月22日 22:38:11 | loewis | link | issue1743 messages |
| 2008年01月22日 22:38:10 | loewis | create | |