|
@@ -180,7 +180,7 @@ def readlink(path):
|
|
|
if reparse_point_handle == INVALID_HANDLE_VALUE:
|
|
if reparse_point_handle == INVALID_HANDLE_VALUE:
|
|
|
_raise_winerror(
|
|
_raise_winerror(
|
|
|
get_last_error(),
|
|
get_last_error(),
|
|
|
- 'Error opening symblic link \"%s\"'.format(path))
|
|
|
|
|
|
|
+ 'Error opening symbolic link \"%s\"'.format(path))
|
|
|
target_buffer = c_buffer(MAXIMUM_REPARSE_DATA_BUFFER_SIZE)
|
|
target_buffer = c_buffer(MAXIMUM_REPARSE_DATA_BUFFER_SIZE)
|
|
|
n_bytes_returned = DWORD()
|
|
n_bytes_returned = DWORD()
|
|
|
io_result = DeviceIoControl(reparse_point_handle,
|
|
io_result = DeviceIoControl(reparse_point_handle,
|
|
@@ -195,7 +195,7 @@ def readlink(path):
|
|
|
if not io_result:
|
|
if not io_result:
|
|
|
_raise_winerror(
|
|
_raise_winerror(
|
|
|
get_last_error(),
|
|
get_last_error(),
|
|
|
- 'Error reading symblic link \"%s\"'.format(path))
|
|
|
|
|
|
|
+ 'Error reading symbolic link \"%s\"'.format(path))
|
|
|
rdb = REPARSE_DATA_BUFFER.from_buffer(target_buffer)
|
|
rdb = REPARSE_DATA_BUFFER.from_buffer(target_buffer)
|
|
|
if rdb.ReparseTag == IO_REPARSE_TAG_SYMLINK:
|
|
if rdb.ReparseTag == IO_REPARSE_TAG_SYMLINK:
|
|
|
return _preserve_encoding(path, rdb.SymbolicLinkReparseBuffer.PrintName)
|
|
return _preserve_encoding(path, rdb.SymbolicLinkReparseBuffer.PrintName)
|
|
@@ -204,7 +204,7 @@ def readlink(path):
|
|
|
# Unsupported reparse point type
|
|
# Unsupported reparse point type
|
|
|
_raise_winerror(
|
|
_raise_winerror(
|
|
|
ERROR_NOT_SUPPORTED,
|
|
ERROR_NOT_SUPPORTED,
|
|
|
- 'Error reading symblic link \"%s\"'.format(path))
|
|
|
|
|
|
|
+ 'Error reading symbolic link \"%s\"'.format(path))
|
|
|
|
|
|
|
|
|
|
|
|
|
def _preserve_encoding(source, target):
|
|
def _preserve_encoding(source, target):
|