This commit is contained in:
Brian Curtin 2011-06-08 19:29:53 -05:00
parent ce5493f33d
commit caea7e8d23
3 changed files with 51 additions and 0 deletions

View file

@ -521,3 +521,15 @@ def relpath(path, start=curdir):
if not rel_list:
return curdir
return join(*rel_list)
try:
# The genericpath.isdir implementation uses os.stat and checks the mode
# attribute to tell whether or not the path is a directory.
# This is overkill on Windows - just pass the path to GetFileAttributes
# and check the attribute from there.
from nt import _isdir
except ImportError:
from genericpath import isdir as _isdir
def isdir(path):
return _isdir(path)