This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author markm
Recipients Oren_Held, giampaolo.rodola, markm, orsenthil, santoso.wijaya, sijinjoseph, tim.golden
Date 2011-06-12.03:23:50
SpamBayes Score 3.7737675e-05
Marked as misclassified No
Message-id <1307849031.15.0.667455678571.issue9035@psf.upfronthosting.co.za>
In-reply-to
Content
I was looking at this - and see that (at least as far as GetFileAttributes is concerned) that a mount and a linked directory are seen the same...

Here are some tests using ctypes

# mounted drive
>>> hex(windll.kernel32.GetFileAttributesW(ur"c:\temp\test_c_mount"))
'0x410'

# normal directory
>>> hex(windll.kernel32.GetFileAttributesW(ur"c:\temp\orig"))
'0x10'

# link (created via mklink /d c:\temp\orig c:\temp\here2
>>> hex(windll.kernel32.GetFileAttributesW(ur"c:\temp\here2"))
'0x410'

On futher searching - I found the following link:
http://msdn.microsoft.com/en-us/library/aa363940%28v=vs.85%29.aspx

So the function ismount will need to do the following
a) Get the file attributes
b) check that it's a directory and is a reparse point
c) Use FindFirstFile (and FindNextFile? - I need to test more) to fill in WIN32_FIND_DATA.dwResearved0
d) Check that against IO_REPARSE_TAG_MOUNT_POINT (0xA0000003)
History
Date User Action Args
2011-06-12 03:23:51markmsetrecipients: + markm, orsenthil, giampaolo.rodola, tim.golden, sijinjoseph, Oren_Held, santoso.wijaya
2011-06-12 03:23:51markmsetmessageid: <1307849031.15.0.667455678571.issue9035@psf.upfronthosting.co.za>
2011-06-12 03:23:50markmlinkissue9035 messages
2011-06-12 03:23:50markmcreate