[client] Implement fs.readlink(); Fix fs.symlink()
- fs.symlink() did not work with relative paths on Windows. This
limitation was overlooked, causing failure at runtime on Windows.
- Add readlink() for completeness.
- With both supported, add unit tests to ensure they work as expected.
- Improve ctypes typing.
- Fix file_path_test.py to pass on Windows.
Ran manually file_path_test.py and fs_test.py on macOS, Ubuntu, and Windows7 as
an administrator.
Bug: 853721
Change-Id: I5acc5b3a02864fff82fd29ea9cd47783f7123d22
Reviewed-on: https://chromium-review.googlesource.com/c/1440361
Reviewed-by: Quinten Yearsley <qyearsley@chromium.org>
Commit-Queue: Marc-Antoine Ruel <maruel@chromium.org>
Cr-Mirrored-From: https://chromium.googlesource.com/infra/luci/luci-py
Cr-Mirrored-Commit: 87e679e3959c911955d9d61ccae6d7339b11e93d
diff --git a/utils/logging_utils.py b/utils/logging_utils.py
index 9b559f5..8001b01 100644
--- a/utils/logging_utils.py
+++ b/utils/logging_utils.py
@@ -32,7 +32,7 @@
import msvcrt # pylint: disable=F0401
import _subprocess # pylint: disable=F0401
- FILE_ATTRIBUTE_NORMAL = 0x00000080
+ FILE_ATTRIBUTE_NORMAL = 0x80
FILE_SHARE_READ = 1
FILE_SHARE_WRITE = 2
FILE_SHARE_DELETE = 4