Changes between Initial Version and Version 1 of Ticket #2605, comment 2
- Timestamp:
- 2015-12-08T01:27:14Z (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #2605, comment 2
initial v1 1 [https://bugs.python.org/issue21719] says that there is no Python 2.7 API for this. Therefore, a `ctypes` call to either [https://msdn.microsoft.com/en-us/library/windows/desktop/aa364944.aspx GetFileAttributesW] or [https://msdn.microsoft.com/en-us/library/windows/desktop/aa364946.aspx GetFileAttributesEx] is needed. Note that we already `lstat` the file in `get_pathinfo` before deciding whether to upload it, but I guess that determining whether it is hidden/system does not need to be atomic with that, therefore the simpler `GetFileAttributesW` API would be sufficient. The `ctypes` call should be implemented in `fileutil.py` .1 [https://bugs.python.org/issue21719] says that there is no Python 2.7 API for this. Therefore, a `ctypes` call to either [https://msdn.microsoft.com/en-us/library/windows/desktop/aa364944.aspx GetFileAttributesW] or [https://msdn.microsoft.com/en-us/library/windows/desktop/aa364946.aspx GetFileAttributesEx] is needed. Note that we already `lstat` the file in `get_pathinfo` before deciding whether to upload it, but I guess that determining whether it is hidden/system does not need to be atomic with that, therefore the simpler `GetFileAttributesW` API would be sufficient. The `ctypes` call should be implemented in `fileutil.py`, either as part of `get_pathinfo` or separately.