diff -r 5c48fbe12cb8 Lib/test/test_os.py --- a/Lib/test/test_os.py Sat Jan 14 21:04:40 2017 +0900 +++ b/Lib/test/test_os.py Sat Jan 14 15:35:50 2017 -0500 @@ -2117,6 +2117,14 @@ os.stat(os.path.relpath(link))) finally: os.chdir(orig_dir) + + @unittest.skipUnless(os.path.lexists(r'C:\Users\All Users') + and os.path.exists(r'C:\ProgramData'), + 'Test directories not found') + def test_29248(self): + target = os.readlink(r'C:\Users\All Users') + + self.assertTrue(os.path.samefile(target, r'C:\ProgramData')) @unittest.skipUnless(sys.platform == "win32", "Win32 specific tests") diff -r 5c48fbe12cb8 Modules/posixmodule.c --- a/Modules/posixmodule.c Sat Jan 14 21:04:40 2017 +0900 +++ b/Modules/posixmodule.c Sat Jan 14 15:35:50 2017 -0500 @@ -7106,7 +7106,7 @@ return NULL; } print_name = rdb->SymbolicLinkReparseBuffer.PathBuffer + - rdb->SymbolicLinkReparseBuffer.PrintNameOffset; + (rdb->SymbolicLinkReparseBuffer.PrintNameOffset / 2); result = PyUnicode_FromWideChar(print_name, rdb->SymbolicLinkReparseBuffer.PrintNameLength/2);