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 dbkoch
Recipients dbkoch, tarek, ysj.ray
Date 2010-05-14.14:58:45
SpamBayes Score 2.6173698e-06
Marked as misclassified No
Message-id <1273849127.66.0.978958014101.issue8705@psf.upfronthosting.co.za>
In-reply-to
Content
Here's the session printout. Desktop files under Vista still get deleted despite the exception. Does not occur on Fedora 12 or Mac OS X. I can code around it by testing for a blank filepath, but it was a surprise.

C:\Users\ko5>python
Python 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import os, shutil, user
>>> desktop_dir = os.path.join(user.home, 'Desktop')
>>> os.chdir(desktop_dir)
>>> os.getcwd()
'C:\\Users\\ko5\\Desktop'
>>> shutil.rmtree('')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python26\lib\shutil.py", line 225, in rmtree
    onerror(os.rmdir, path, sys.exc_info())
  File "C:\Python26\lib\shutil.py", line 223, in rmtree
    os.rmdir(path)
WindowsError: [Error 3] The system cannot find the path specified: ''
>>>
History
Date User Action Args
2010-05-14 14:58:47dbkochsetrecipients: + dbkoch, tarek, ysj.ray
2010-05-14 14:58:47dbkochsetmessageid: <1273849127.66.0.978958014101.issue8705@psf.upfronthosting.co.za>
2010-05-14 14:58:46dbkochlinkissue8705 messages
2010-05-14 14:58:45dbkochcreate