python / cpython

The Python programming language
https://www.python.org
Other
63.88k stars 30.57k forks source link

os.path.samefile fails on windows network drive #75649

Open b94459e3-bd1a-4e1a-be19-bd26a84c63c1 opened 7 years ago

b94459e3-bd1a-4e1a-be19-bd26a84c63c1 commented 7 years ago
BPO 31468
Nosy @pfmoore, @tjguk, @zware, @zooba

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: ```python assignee = None closed_at = None created_at = labels = ['type-bug', 'OS-windows'] title = 'os.path.samefile fails on windows network drive' updated_at = user = 'https://bugs.python.org/DanielSauer' ``` bugs.python.org fields: ```python activity = actor = 'Daniel Sauer' assignee = 'none' closed = False closed_date = None closer = None components = ['Windows'] creation = creator = 'Daniel Sauer' dependencies = [] files = [] hgrepos = [] issue_num = 31468 keywords = [] message_count = 1.0 messages = ['302170'] nosy_count = 5.0 nosy_names = ['paul.moore', 'tim.golden', 'zach.ware', 'steve.dower', 'Daniel Sauer'] pr_nums = [] priority = 'normal' resolution = None stage = None status = 'open' superseder = None type = 'behavior' url = 'https://bugs.python.org/issue31468' versions = ['Python 3.5'] ```

b94459e3-bd1a-4e1a-be19-bd26a84c63c1 commented 7 years ago

On my Windows network drive os.path.samefile() seems to return True regardless of input paths. In my case this results in an error trying to save checkpoints of jupyter notebooks on this drive. I am using Windows 7, my working directory is located on a network drive that is offline-available (CSC cache). Tracing this problem back it seems to have something to do with nt._getfinalpathname() reporting a wrong result.