~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/osutils.py

Merge landed readdir acceleration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1324
1324
        dirblock = []
1325
1325
        append = dirblock.append
1326
1326
        for name in sorted(_listdir(top)):
1327
 
            name_utf8 = _utf8_encode(name)[0]
 
1327
            try:
 
1328
                name_utf8 = _utf8_encode(name)[0]
 
1329
            except UnicodeDecodeError:
 
1330
                raise errors.BadFilenameEncoding(
 
1331
                    _utf8_encode(relprefix)[0] + name, _fs_enc)
1328
1332
            abspath = top_slash + name
1329
1333
            statvalue = _lstat(abspath)
1330
1334
            kind = _kind_from_mode(statvalue.st_mode)