➜

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.

作者 cmikula
收信人 cmikula
日期 2012-09-15.12:57:39
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1347713860.36.0.872797660614.issue15946@psf.upfronthosting.co.za>
In-reply-to
内容
OS Windows 8 Enterprise x64 clean installed.
Python Version 2.6.6 and 2.7.3 both x64 installed.

Problem is to delete one Directory and immediately after create one new with the same Name!

!!! Code !!!

import sys, platform, os, shutil

TEST_PATH = "/test"

print "platform:\t", platform.platform()
print "sys.platform:\t", sys.platform
print "sys.version:\t", sys.version
print "directory test:\t'%s'" % TEST_PATH
print

if os.path.exists(TEST_PATH):
    shutil.rmtree(TEST_PATH)
if not os.path.exists(TEST_PATH):
    os.makedirs(TEST_PATH)

print "success"

!!! End of code !!!

The error is only present if the Directory was deleted previously.

Error:
Traceback (most recent call last):
  File "dir_test.py", line 23, in <module>
    os.makedirs(BUILD_PATH)
  File "C:\Program Files\Python27\lib\os.py", line 157, in makedirs
    mkdir(name, mode)
WindowsError: [Error 5] Zugriff verweigert: '/test'
历史
日期 用户 动作 参数
2012-09-15 12:57:40cmikula修改recipients: + cmikula
2012-09-15 12:57:40cmikula修改messageid: <1347713860.36.0.872797660614.issue15946@psf.upfronthosting.co.za>
2012-09-15 12:57:39cmikula链接issue15946 messages
2012-09-15 12:57:39cmikula创建