mirror of
https://github.com/borgbackup/borg.git
synced 2026-05-28 04:03:21 -04:00
windows.pyx: add error code.
This commit is contained in:
parent
97f07657ee
commit
ce46aab57b
1 changed files with 3 additions and 1 deletions
|
|
@ -77,6 +77,7 @@ cdef extern from 'windows.h':
|
|||
cdef extern int ERROR_INSUFFICIENT_BUFFER
|
||||
cdef extern int ERROR_INVALID_SID
|
||||
cdef extern int ERROR_NONE_MAPPED
|
||||
cdef extern int ERROR_HANDLE_EOF
|
||||
|
||||
cdef extern int OWNER_SECURITY_INFORMATION
|
||||
cdef extern int GROUP_SECURITY_INFORMATION
|
||||
|
|
@ -359,6 +360,7 @@ def sync_dir(path):
|
|||
# TODO
|
||||
pass
|
||||
|
||||
|
||||
def get_ads(path):
|
||||
ret = []
|
||||
cdef _WIN32_FIND_STREAM_DATA data
|
||||
|
|
@ -371,7 +373,7 @@ def get_ads(path):
|
|||
while FindNextStreamW(searchHandle, <void*>&data) != 0:
|
||||
ret.append(PyUnicode_FromWideChar(data.cStreamName, -1))
|
||||
errno = GetLastError()
|
||||
if errno != 38:
|
||||
if errno != ERROR_HANDLE_EOF:
|
||||
raise_error('FindNextStreamW', path)
|
||||
|
||||
FindClose(searchHandle)
|
||||
|
|
|
|||
Loading…
Reference in a new issue