~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/_walkdirs_win32.pyx

  • Committer: John Arbash Meinel
  • Date: 2008-07-17 04:49:57 UTC
  • mto: This revision was merged to the branch mainline in revision 3557.
  • Revision ID: john@arbash-meinel.com-20080717044957-xokssio0q76zy0q3
A couple small cleanups, make test_osutils more correct

Show diffs side-by-side

added added

removed removed

Lines of Context:
176
176
    def __iter__(self):
177
177
        return self
178
178
 
 
179
    cdef object _get_kind(self, WIN32_FIND_DATAW *data):
 
180
        if data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY:
 
181
            return self._directory_kind
 
182
        return self._file_kind
 
183
 
179
184
    cdef _Win32Stat _get_stat_value(self, WIN32_FIND_DATAW *data):
180
185
        """Get the filename and the stat information."""
181
186
        cdef _Win32Stat statvalue
190
195
        statvalue.st_dev = 0
191
196
        return statvalue
192
197
 
193
 
    cdef object _get_kind(self, WIN32_FIND_DATAW *data):
194
 
        if data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY:
195
 
            return self._directory_kind
196
 
        return self._file_kind
197
 
 
198
198
    def _get_files_in(self, directory, relprefix):
199
199
        cdef WIN32_FIND_DATAW search_data
200
200
        cdef HANDLE hFindFile
219
219
                if _should_skip(&search_data):
220
220
                    result = FindNextFileW(hFindFile, &search_data)
221
221
                    continue
222
 
                name_unicode = self._get_name(&search_data)
 
222
                name_unicode = _get_name(&search_data)
223
223
                name_utf8 = PyUnicode_AsUTF8String(name_unicode)
224
224
                relpath = relprefix + name_utf8
225
225
                abspath = directory + name_unicode