Message349626
> I'm wary of trying to return it without the prefix.
Me too, but suddenly adding "\\?\" to the paths breaks a lot of assumptions.
> We would need a function that's shared with the proposed implementation of realpath() to determine whether the given path (not the final path) is safe to return as a normal DOS or UNC path.
My idea was to GetFinalPathName(path[4:])[4:] and if that fails, don't strip the prefix. Which is obviously not be perfect, but since we're not going to add a check for the LongPathsEnabled flag (let alone any of the other edge cases), we can't easily figure out whether it's safe to return manually.
I really want a fix for this in 3.8, or else os.stat(sys.executable) may fail, but I don't think changing the result of readlink() is okay at this stage. Maybe I'll leave that out for now and just take the st_reparse_tag and stat() changes? |
|
Date |
User |
Action |
Args |
2019-08-14 00:15:53 | steve.dower | set | recipients:
+ steve.dower, paul.moore, tim.golden, zach.ware, eryksun |
2019-08-14 00:15:53 | steve.dower | set | messageid: <1565741753.38.0.821277015771.issue37834@roundup.psfhosted.org> |
2019-08-14 00:15:53 | steve.dower | link | issue37834 messages |
2019-08-14 00:15:53 | steve.dower | create | |
|