Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Bugs

[issue5985] Implement os.path.samefile and os.path.sameopenfile on Windows

 

 

Python bugs RSS feed   Index | Next | Previous | View Threaded


report at bugs

Dec 3, 2009, 5:31 AM

Post #1 of 3 (221 views)
Permalink
[issue5985] Implement os.path.samefile and os.path.sameopenfile on Windows

Erik Carstensen <sandberg [at] virtutech> added the comment:

> Once I considered this approach, but problems was that
> nFileIndexLow/High can change every time file handle is opened, so it's
> not unique. See remarks in following page.
> http://msdn.microsoft.com/en-us/library/aa363788%28VS.85%29.aspx

Actually, that page only says that file identities may vary over time,
and that it may happen during operations such as defragmentation.
However, I have been in contact with a customer who observed a file
system where the file index actually changed every time a file was
closed and re-opened, given that nobody else kept the file open
inbetween. This was on some kind of network mount, I wasn't told which
kind (and I couldn't reproduce it with samba).

This means that it's actually essential that you don't close the file
between the CreateFile calls (and yes, your patch does this correctly).

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue5985>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Dec 3, 2009, 7:00 AM

Post #2 of 3 (201 views)
Permalink
[issue5985] Implement os.path.samefile and os.path.sameopenfile on Windows [In reply to]

Changes by Terry J. Reedy <tjreedy [at] udel>:


----------
nosy: -tjreedy

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue5985>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Dec 5, 2009, 5:38 PM

Post #3 of 3 (185 views)
Permalink
[issue5985] Implement os.path.samefile and os.path.sameopenfile on Windows [In reply to]

Andrew Svetlov <andrew.svetlov [at] gmail> added the comment:

Please note: patch for http://bugs.python.org/issue1578269 is already has
implementation for samefile. It's easer to add sameopenfile is same way
than maintain two different approaches.

Unfortunately solution will work only starting from Windows Vista and
Windows Server 2008.

----------
nosy: +asvetlov

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue5985>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com

Python bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.