update
This commit is contained in:
5
.CondaPkg/env/Lib/pathlib.py
vendored
5
.CondaPkg/env/Lib/pathlib.py
vendored
@@ -630,8 +630,7 @@ class PurePath(object):
|
||||
if not self.name:
|
||||
raise ValueError("%r has an empty name" % (self,))
|
||||
f = self._flavour
|
||||
drv, root, tail = f.splitroot(name)
|
||||
if drv or root or not tail or f.sep in tail or (f.altsep and f.altsep in tail):
|
||||
if not name or f.sep in name or (f.altsep and f.altsep in name) or name == '.':
|
||||
raise ValueError("Invalid name %r" % (name))
|
||||
return self._from_parsed_parts(self.drive, self.root,
|
||||
self._tail[:-1] + [name])
|
||||
@@ -1006,7 +1005,7 @@ class Path(PurePath):
|
||||
def open(self, mode='r', buffering=-1, encoding=None,
|
||||
errors=None, newline=None):
|
||||
"""
|
||||
Open the file pointed by this path and return a file object, as
|
||||
Open the file pointed to by this path and return a file object, as
|
||||
the built-in open() function does.
|
||||
"""
|
||||
if "b" not in mode:
|
||||
|
||||
Reference in New Issue
Block a user