[Patches] [ python-Patches-954115 ] Fix os.stat handling of UNC
roots
SourceForge.net
noreply at sourceforge.net
Mon May 31 15:46:26 EDT 2004
Patches item #954115, was opened at 2004-05-14 19:57
Message generated for change (Settings changed) made by loewis
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=954115&group_id=5470
Category: Core (C code)
Group: Python 2.3
Status: Open
Resolution: None
>Priority: 6
Submitted By: Greg Chapman (glchapman)
>Assigned to: Martin v. Löwis (loewis)
Summary: Fix os.stat handling of UNC roots
Initial Comment:
This is a patch for the bug described at:
www.python.org/sf/513572
The patch adds two new routines to posixmodule.c:
IsUNCRootA and IsUNCRootW which test if a supplied
path matches the pattern for a UNC root directory.
These routines are called by posix_do_stat in two
different places: 1) when testing if a path with a
trailing slash is a drive root and 2) to see if a path
without a trailing slash is a UNC root.
The first of these is the real bug fix; it allows UNC roots
to be specified as "//server/share/" rather
than "//server/share//".
The second was added because it is easy to forget to
add the trailing slash to "//server/share", but stats of
UNC roots without the trailing slash will fail. However, I
think this is an optional addition.
I'm not sure what to do about tests, since existing
shares will obviously vary from system to system, and
it seems to me that the test suite should not
temporarily add a share just to test this feature.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=954115&group_id=5470
More information about the Patches
mailing list