New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Symlink to directory on Windows 8 #67996
Comments
Looks as a symlink on Windows 8 can has the FILE_ATTRIBUTE_DIRECTORY flag. http://buildbot.python.org/all/builders/AMD64%20Windows8%203.4/builds/348/steps/test/logs/stdio Traceback (most recent call last):
File "D:\buildarea\3.4.bolen-windows8\build\lib\test\test_os.py", line 802, in test_walk_bottom_up
self.sub2_tree)
AssertionError: Tuples differ: ('@test_3872_tmp\\TEST1\\SUB2', ['broken_link', 'link'], ['tmp3']) != ('@test_3872_tmp\\TEST1\\SUB2', ['link'], ['broken_link', 'tmp3']) First differing element 1:
+ ('@test_3872_tmp\\TEST1\\SUB2', ['link'], ['broken_link', 'tmp3']) ====================================================================== Traceback (most recent call last):
File "D:\buildarea\3.4.bolen-windows8\build\lib\test\test_os.py", line 782, in test_walk_prune
self.assertEqual(all[1], self.sub2_tree)
AssertionError: Tuples differ: ('@test_3872_tmp\\TEST1\\SUB2', ['broken_link', 'link'], ['tmp3']) != ('@test_3872_tmp\\TEST1\\SUB2', ['link'], ['broken_link', 'tmp3']) First differing element 1:
+ ('@test_3872_tmp\\TEST1\\SUB2', ['link'], ['broken_link', 'tmp3']) ====================================================================== Traceback (most recent call last):
File "D:\buildarea\3.4.bolen-windows8\build\lib\test\test_os.py", line 765, in test_walk_topdown
self.assertEqual(all[3 - 2 * flipped], self.sub2_tree)
AssertionError: Tuples differ: ('@test_3872_tmp\\TEST1\\SUB2', ['broken_link', 'link'], ['tmp3']) != ('@test_3872_tmp\\TEST1\\SUB2', ['link'], ['broken_link', 'tmp3']) First differing element 1:
+ ('@test_3872_tmp\\TEST1\\SUB2', ['link'], ['broken_link', 'tmp3']) ---------------------------------------------------------------------- Create broken link: os.symlink('non_existing_patch', 'broken_link', target_is_directory=True) What return os.path.isdir('broken_link')? |
It returns True. |
Then tests should be adapted for Windows 8. |
New changeset 19a3e0e664af by Serhiy Storchaka in branch '3.4': New changeset f9e22717722d by Serhiy Storchaka in branch '3.5': New changeset da020e408c7f by Serhiy Storchaka in branch 'default': |
This behavior is not specific to just Windows 8. Symlinks to directories are treated as directories on Windows, in particular, they should be removed with RemoveDirectory, not DeleteFile. Is there any reason this issue is still open? |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: