Fix infinite loop in grit headers clobbering script.

It turns out that on Windows the path-splitting function will always preserve the drive part (c:\).

TEST=none
http://crbug.com/17706

Review URL: http://codereview.chromium.org/159827

git-svn-id: http://src.chromium.org/svn/trunk/src/build@22344 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
phajdan.jr@chromium.org 2009-08-03 23:24:31 +00:00
Родитель 2f5382a860
Коммит 534b61d558
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -22,6 +22,8 @@ def total_split(path):
components = []
while path:
head, tail = os.path.split(path)
if not tail:
break
components.append(tail)
path = head
return list(reversed(components))
@ -46,4 +48,4 @@ for path in sys.argv[1:]:
os.remove(full_path)
print 'Clobbered ' + full_path
except OSError:
print 'Could not remove ' + full_path + '. Continuing.'
print 'Could not remove ' + full_path + '. Continuing.'