[issue10540] test_shutil fails on Windows after r86733

2010-11-26 Thread Brian Curtin

New submission from Brian Curtin cur...@acm.org:

My build slave shows a test failure at test_dont_copy_file_onto_link_to_itself. 
This happens because the implementation of _samefile in Lib/shutil.py (line 70) 
doesn't work for Windows hard links.

Patch on the way.

--
assignee: brian.curtin
components: Library (Lib), Windows
messages: 122462
nosy: brian.curtin
priority: normal
severity: normal
stage: needs patch
status: open
title: test_shutil fails on Windows after r86733
type: behavior
versions: Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10540
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10540] test_shutil fails on Windows after r86733

2010-11-26 Thread Brian Curtin

Brian Curtin cur...@acm.org added the comment:

Here is a patch.

os.path.samefile and hard links don't work for Windows the same way they do for 
Mac/Linux. In the case where we are on Windows and a link comes into the 
_samefile function, check that it's a link and then use os.path.sameopenfile. 
If it's not a link but a regular file, or it's some other OS, do the 
os.path.samefile check.

--
keywords: +patch
nosy: +tarek
Added file: http://bugs.python.org/file19826/issue10540.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10540
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com